Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4543000
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:28:10+00:00 2026-05-21T15:28:10+00:00

Edit for those who say to use tab control I would love to use

  • 0

Edit for those who say to use tab control

I would love to use a tab control; yet i have no idea how to go about linking the tab control up from the main form. I would assume that I would have to do something like this:

  1. Create Form with a blank TabControl on it, no pages created.
  2. Create a CustomuserControl (Add -> user Control), with my controls on it.
  3. When a new chat comes in, create a tab control Item, Tab Control Page, add the Custom Control to the Tab Control Page. Add the tab control handle to the hash table, so that when new messages come in, they can be referenced in the proper control.

But, i am so not sure how to do this. For example, I know that I can create custom events inside of the User Control, so that, for example, if each control has a ‘bold’ button, i can each page that has that control on it, to actually USE the button.

Yet i also need to register message callbacks, so that I can use a MessageGrabber to send data to it, and tha’ts not assigned inside of the UserControl, that’s assigned programatically when a new window comes in; but since I have no controls to reference, i can’t assign.


KISS Philosophy

Wouldn’t it be easier to just create the form, like i do now, and then just dock that form within a window or something? So that, in essence, it’s still creating the form, but it’s also a separate window?


Original Question

Okay, so i’m stumped (which isn’t that big of a surprise when it comes to complex C# logic lol)! What i’m trying to do is the following:

Goal: Setup tabbed chatting for new chat application.

Completed: Open new window whenever a chat message is received, or a user requests a new chat from the roster. This is working perfectly, and opens only a window when the user doesn’t already have the chat open. Nice and happy there.

Problem: I dont want windows. Well, i do want A window, but, i do not want tons of separate windows. For example, our Customer Service team may have about 10 active IM windows going at one time, i do not want them to have to have 10 windows tiled there lol. I’d rather they have a single Private IM window, and all 10 tabs docked within the window.

Logic: This is my logic here, which may be flawed, i do apologize:

  • OnMessage: Open new chat window if one doesn’t already exist; if one exists, open it as a tab within the current chat window.
  • SendMessage: ^^ ditto ^^

Code Examples:

if (!Util.ChatForms.ContainsKey(msg.From.Bare))
            {
                RosterNode rn = rosterControl1.GetRosterItem(msg.From);
                string nick = msg.From.Bare;
                if (rn != null)
                    nick = rn.Text;
                frmChat f = new frmChat(msg.From, xmpp, nick);
                f.Show();
                f.IncomingMessage(msg);
                return;
            }

Note on above: The Util. function just keeps tracks of what windows are opened inside of a hashtable, that way, when messages come in, they route to the proper window. That is added with the:

Util.ChatForms.Add(m_Jid.Bare.ToLower(), this);

Command in the frmChat() form.

Library in Use: agsxmpp from: http://www.ag-software.de/agsxmpp-sdk/download/

Problem:
How can i convert this code to open inside of tabs, instead of windows? Can someone please give me some ideas, and help with that. I just can’t seem to wrap my head around that concept.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:28:11+00:00Added an answer on May 21, 2026 at 3:28 pm

    Use TabControl

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say we have photographers who use one computer in a department. They take
My current solution will suck sometimes EDIT For those who don't understand,see this example:
Possible Duplicate: C# 'var' keyword versus explicitly defined variables EDIT: For those who are
For those who still don't know about Responsive Design I suggest this link As
I have these urls: http://localhost:3000/assets http://localhost:3000/assets/new http://localhost:3000/assets/34 http://localhost:3000/assets/34/edit they work in my app. I
char *p=orkut vs const char *p=orkut whats the difference btwn these two... EDIT from
I have a few classes, such as those that outline database table structure or
EDIT: Thanks Kenny and everyone else who answered similarly. It really was a DOH
Let's say I have an existing application written in Java which I wish to
Let's say I have a function called DisplayWhiskers() which puts some slashes and backslashes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.