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

Dealing with multiple forms

Status
Not open for further replies.

dlpastel

Programmer
Aug 8, 2002
114
US
I come from a Clipper xbase backround and am having trouble dealing with all the windows in this type of programming. I am writing a app that will manage a business. I have created forms for Customers, Invoices, Inventory. What I want to do is have one main form and then pop up these forms for entry when I need them and then close them back down. With the main form on, when I say formCust.show the customer form comes up. This seems fine but then if I take my mouse and click on the main form, the customer form looses focus and is now behind the main form. This is a problem because it is easy to forget that you have this form open. I could easily open several forms and not know that they are behind the main form. So my question is whether there is some type of standard practice that you use to manage all of these windows so the user does not think they are closed when really they are hiding behind another window. I tried a mdi form but then the customer form gets minimized on the task bar which is also no good. I hope this makes sense.

Thanks,
Dan
 
Hi Dan

What you need to do is launch your child forms modally so that they cannot loose focus:

customerform.show vbmodal

this ensures that in order for focus to resume to your main form the user would have to of clicked the OK button for example on your customers form where you can call the hide or unload code as required.

Hope ths helped
Steve
 
Thank you so much! I new there had to be some way of doing it.
 
You can also specify where on the screen each form is displayed and arrange them to appear tiled.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top