How Can I Have TopMost Form Without Stealing Focus?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a pop-up Windows Form that displays next on top of the system tray. I
can get it to pop-up just fine using .TopMost and .Show, but the problem is
that it seals focus away from the application that the user is currently
using... I don't want that. I have gone to the API level and used calls like
ShowWindow, SetWindowLong and SetWindowPos, but none seem to work right.
Either the window does not come up or it just appears for a split second and
then disappears.

Any suggestions would be greatly appreciated!

David McCarter


=====================
David McCarter
www.vsdntips.com
 
if your window is a popup it behave properly, ever seen two popup menus at
the same? i'd try a normal window instead of a popup
 
Sorry I was not clear, it is a normal window. It just pops-up (appears) above
the system tray like the MSN Messenger or Outlook notification window does.
 
Ok, so if you know what window is on top before you popyour window up, can't
you pull that first one to the front after you have pop-upped/popped-up your
window?
 
I finally figured it out... the deffinition for SetWindowsPos I got from some
web page was wrong. Once I change the param types to Integer, it started
working :-)
 
Well done!

dotNetDave said:
I finally figured it out... the deffinition for SetWindowsPos I got from
some
web page was wrong. Once I change the param types to Integer, it started
working :-)
 
Back
Top