bring back to front after minimize?

  • Thread starter Thread starter h@rry
  • Start date Start date
H

h@rry

Hi,

After some reading i found out that the (X) on the right above on pocketPC is not closing but minimizing the app i implemented a tray icon. On clicking i want the app to get back to the front.. sounds easy ;-)

but i can't figure it out...

i tried this:
private void NotifyIcon1_Click(object sender, System.EventArgs e)
{
this.BringToFront();
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
}

nothing..

If i use
MessageBox.Show("back2front");

i've got the app in front again... but i don't want a messagebox, i just want the app to be there again... any ideas?


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
 
But is not an external process?
i can use a messagebox.show("I'm back!")
and the app is in front again..

the sample code is working fine b.t.w.

but this i cannot understand why a messagebox can bring it to the front and
you need an extra DLL to do otherwise
 
You don't need an extra dll just to do this - you can pick the p/invoke
definitions for the two functions required and add it into your own code.

Peter
 
Back
Top