Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am developing a chat application using jabber-net opensource library..
my aim is to display a form (chat window ) when a message is coming.
But when I use this code, Form appears in the task bar,,, not perfectly rendered...
seems like this... More over I can see the form only when I mousehover the Icon on taskbar (Hail Windows 7)... Any form are like this...

Click here for Picture[^]

my code is this...

C#
public jabber.client.JabberClient jabberClient1;
jabberClient1.User = UserName;
jabberClient1.Password = Password;
jabberClient1.Resource = resource;
jabberClient1.AutoRoster = true;
jabberClient1.OnMessage += new MessageHandler(jabberClient1_OnMessage);

private void jabberClient1_OnMessage(object sender, jabber.protocol.client.Message msg)
{
	try
	{
		chatWindow chw = new chatWindow();
		chw.Left = 0;
		chw.Top = 0;
		chw.TopMost = true;
		//chw.LoadChat(msg.From.User, msg.From.Bare, "0");
		//chw.SetMessage(msg);
		chw.Show();
	}
}
Posted
Updated 19-Nov-13 23:27pm
v2

try
chk.BringToFront();
 
Share this answer
 
Thanks all who answered me,,, I have solved it myself....
The Problem was I had to set the InvokeCOntrol property in jabberclient to the very first form loaded in the application... If Invoked COntrol form is not loaded, It will show all forms shown from its events like this... Here is the code...

JabberClient1.InvokeControl = FirstShownFormInstance;
 
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