Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am implementing a chat option in my application. Until now I am able to chat in group. But when I click on some user, a separate window has to be opened and should have textbox inside it.

Can anyone help me please?
Posted
Updated 1-Feb-11 23:29pm
v2

Create a form :
Right click your project and select "Add".."New Windows form"
Give it a sensible name (for example: "frmChatToUser", and then when you need to display it:
frmChatToUser chat = new frmChatToUser();
chat.Show();
or
frmChatToUser chat = new frmChatToUser();
chat.ShowDialog();
if you want it to prevent further activity in you main form until you have finished with the user.
 
Share this answer
 
Add a new Windows Form item to your project and design it however you need it to be. Just for this explanation I'll pretend it is called ChatForm

In the event handler for the event that is raised when you click the user put something like:
C#
using (ChatForm cf = new ChatForm())
{
  cf.ShowDialog();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900