c# - Main window appears behind other windows after splash screen -


i have windows forms application splash screen. when run application splash screen shows fine, disappears , main form application loaded.

however, when load main form appears beneath windows explorer directory contains application. here segment of code runs splash screen , main form.

namespace windowsformsapplication1 {     public partial class form1 : form     {                 public form1()         {             thread t = new thread(new threadstart(splashstart));             t.start();             thread.sleep(1500);             initializecomponent();             t.abort();         }                 public void splashstart()         {             application.run(new splashscreen());         }     } }    

how can form1 show above other windows?

form1.activate();  

this should make focus , bring front.

msdn link: system windows forms form activate


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -