What is vbModal? 
Author Message
 What is vbModal?

I tried looking it up in the VB help but it just says it is a flag for a form.
 Can anyone give me the gist of this?


Sat, 07 May 2005 23:36:42 GMT  
 What is vbModal?

Quote:
> I tried looking it up in the VB help but it just says it is a flag for
a form.
>  Can anyone give me the gist of this?

Start a new project, place two CommandButtons on the Form and add this
code to the Form's code window.

     Private Sub Command1_Click()
        Form2.Show
     End Sub

     Private Sub Command2_Click()
        Form2.Show vbModal
     End Sub

Now, add a 2nd Form to the project (Project/AddForm from the VB menu)
and Run the project. Click on the Command1 button and then click on the
first form. Now dismiss the 2nd Form using the "X" in the TitleBar (move
Form1 out of the way if it is hiding Form2). Now click on the Command2
button and try to click on the first form. Notice that you can't. That
is the basic difference... being modal means the modal form **must** be
dismissed before the calling form's code can continue.

Rick - MVP



Sat, 07 May 2005 23:50:26 GMT  
 What is vbModal?

Quote:

> I tried looking it up in the VB help but it just says it is a flag
>  for a form. Can anyone give me the gist of this?

Well, this line of code will show a form modally:

AnyForm.Show vbModal

This basically means you can't click on or use any other form in your
application until that one is closed.

--
Max Bolingbroke MCP
http://www.bolingbroke.net/novanet/



Sun, 08 May 2005 00:11:35 GMT  
 What is vbModal?

Quote:

> I tried looking it up in the VB help but it just says it is a flag for a form.
>  Can anyone give me the gist of this?

If nothing else, try the online dictionary:
http://dictionary.reference.com/search?q=Modal

<g>
LFS



Sun, 08 May 2005 00:43:44 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. vbmodal to vbmodal , not vbmodal to not vbmodal

2. I am trying to update a record, i am not using data control

3. I am learning VB.NET and am wondering....

4. I am trying to update a record, i am not using data control

5. VBModal question

6. vbModal forms

7. VBModal causes illegal operation

8. MDI Child VbModal (is this Possible)

9. vbModal

10. vbModal problems

11. ActiveX Vbmodal mess Please help !

12. VBModal Problem

 

 
Powered by phpBB® Forum Software