Modal form

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?

Thanks!
 
Use Form.ShowDialog to display a modal form.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
Two things..

1) You can look at the form border type property to control what buttons and
options are availabel on that form when shown. One of them is fixed dialog.

2) When you show the form use the ShoeDialog method:

Dim frm As New FormToShow
frm.ShowDialog

You can even get a dialog result from the from as it closes just like a real
standard dialog box by setting the forms DialogResult values.

Dim frm As New FormToShow
Dim retval as DialogResult

retval = frmShowDialog

If retval = DialogResult.OK

Else

End If

In this example the frm would have a setting as such:

Me.DialogResult = Windows.Forms.DialogResult.OK
 
What if the form that needs to be modal is not a Top-level form. For example
it is embedded as a docked control in a panel on another form?
 
What if the form that needs to be modal is not a Top-level form. For example
it is embedded as a docked control in a panel on another form?

I didn't know you could dock a form in a panel?

Thanks,

Seth Rowe
 
Of course you can!!!!!!

form.Parent = control

I think the question should have been:

Why on earth would one want to use a docked form as a modal dialog?
 
Back
Top