Click here to Skip to main content
15,892,809 members
Articles / Programming Languages / C#

How to prevent Form from loosing focus (in the application)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
24 May 2010CPOL 11K   1  
dialog.Owner = this;dialog.Show();// ;}

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
24 May 2010Adrian Pasik 2 alternatives  
We all know that .ShowDialog() is great but sometimes You want to show user some window and keep program running. (.ShowDialog() freezes code execution in method as we all know) Let's say You have this scenario that You want to have form that will not loose focus but at the same time You...
Please Sign up or sign in to vote.
25 May 2010tonyt
Form f = new Form(); f.Shown += delegate(object s, EventArgs e) { MessageBox.Show("Here you go!"); } f.ShowDialog();

License

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


Written By
Software Developer
Lithuania Lithuania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions