Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Focus / Foreground

Status
Not open for further replies.

Jay666

Programmer
Sep 5, 2004
2
GB
How do i get my program to stay in visable and in focus even after a mouse click outside the form?

Thanks
 
When you show the form, show it as a modal form. Form1.show vbmodal
 
Technically, that won't really help solve the problems as stated, as you are only setting the form to be application modal rather than system modal.

Having said that, it is probably about as good as you'll get since MS removed the functionality of the old SetSystemModalWindow in the Win32 API (mainly because system modal windows contradict the concept of multitasking)
 
Hm... It IS possible, Ive asked on another forum and theyve almost solved it...

Thanks anyways..
 
>theyve almost solved it...

And this is the important point. I've not said it is impossible, merely alluded to the fact that it is difficult because you have to program against what the operating system is trying to enforce.
 
If they get it solved, please post it here.

I need to do something along the same lines.
 
This thread (though it doesn't solve the problem) has an idea in it on how to always have your form displayed using SetWindowPos, but your form will not always have focus. Strangely, it also contains a link to this very thread...

Harleyquinn

---------------------------------
For tsunami relief donations
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top