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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I keep a form in the background all the time?

Status
Not open for further replies.

gcarolan

Programmer
Jun 18, 2002
36
IE
When I open my project I have a full screen form with all the project details. I then click on a menu option, if I open another menu option or click on the full screen form the original menu option is now behind the full screen form and no longer accessible.
Is it possible to prevent this from happening and keep the full screen form in the background while other menus are open.

Any help would be appreciated
gcarolan
 

try...
[tt]
formOnTop.Show vbModeless, Me
[/tt]
This will keep the form on top of your background form but will not prevent the background form from recieving focus thus making the form on top block part of the background form.

Good Luck

 
Gee! Does this really work?

formOnTop.Show vbModeless, Me

I didn't know that vb had such function as "vbModeless"

I guess you learn something new everyday huh?

 

Constants my good man, constants! Give it a try. New project, set form1 windowstate property to vbmaximized, add form, add commandbutton to form1, add code (form2.show vbmodless, me), run ...LOL

 
Thanks for your help vb5prgrmr. I tried it out on a new project and it worked a treat but I cant get it to work on my main project.
The Background form (frmBackground) that is maximized is sitting on the mdi form and when a menu option is selected it goes into a create parent form routine and the parent form goes on top of the Background form. I have tried to use the .Show vbModeless, frmBackground in the create parent form routine but to no avail, on clicking the background form the parent form disappears behind it.
As far as I can see it seems to be a problem that all these forms are contained in a mdi form or is that off the mark

gcarolan
 
what are you trying achieve with the frmBackground and what is it for?
 
frmBackground is a reference form with a quick view of the details of all the project information, showing you which menu option to use to navigate to so you can amend the details you require.

frmBackground is maximized and sits on the mdiform but when a menu option ie frmDetails is selected and frmDetails is smaller than frmBackground if you click on frmBackground by mistake or on purpose, frmDetails goes behind frmBackground and cant be got at because the menu option is disabled and I cant minimize frmBackground
 
and you can't use frmDetails.Show 1
cause the frmDetails is a MDIChild?
 
thats right, all the menu options are MDIChilds.

apologies for the delay in getting back to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top