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

Basic use of forms + VBModal Issue

Status
Not open for further replies.

sunil128

Programmer
Mar 20, 2008
45
GB
Could someone please give me some (very) basic tips on how to uses forms i.e the appropriate use of form load/ show/ hide/ unload/ modal etc. When should MDI forms be used etc...

On top of that I could someone also help me a resolve a related an issue with my app. My app opens with a main form (form1) that contains an MSflexgrid, the msflexgrid contains records populated from SQL server. The user can double click a record on the grid and it will open another form (we’ll call it form2 - the only other form in the app) which is basically just textboxes and comboboxes that show the various fields of that selected record.

I want form2 to open modally with the main form sitting in the background but the problem I have is that none of the code that follows the form load event excecutes until form2 closes.

Basically how do I excute code that follows the form_load event, it appears that with modal the code following will not run until the said form is closed. Would an MDI get round this?
 
Sunil,
May I suggest that you'll get better results to your questions if you ask 1 per post.
Re the forms, Try google first there's lots of info out there. If you have a specific question post back.

Good Luck.

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
If you load form 2 modal from form 1 then form 2 must be unloaded before processing continues in form 1.
You must load the second form modeless if you want processing to continue in the first form.
 
You may get the behavior you require if you do Form1.Enabled = False just after Showing Form2 modeless. You should then re-enable Form1 when closing/unloading Form2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top