How Can I Have TopMost Form Without Stealing Focus?

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
 
J

Joep

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
 
G

Guest

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.
 
J

Joep

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?
 
G

Guest

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 :)
 
J

Joep

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top