Open new form in "modal" style...

  • Thread starter Thread starter I_AM_DON_AND_YOU?
  • Start date Start date
I

I_AM_DON_AND_YOU?

Hello all:

Yesterday I put this post regarding the query as to how to open a new form
in "modal" style.

I am calling the form in the following way:

dim frm as form2()
frm = new form2()
frm.show

Where and how should I mention to open form in "modal" sytle.

Thanks!

SENDER (Remember me...)
 
Hi Don,

frm.ShowDialog()

Note, if you have any buttons on your form and you set the dialog result
property, then those buttons will automatically close the form and return
the DialogResult property value in the ShowDialog method:

Dim drResult As DialogResult = frm.ShowDialog()

If drResult = DialogResult.OK Then
...
Else
...
End If

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
but it works...

I used this:
frm.showdialog()

and it opened in "modal" form....
 
* "I_AM_DON_AND_YOU? said:
but it works...

I used this:
frm.showdialog()

and it opened in "modal" form....

You are right, nevertheless the method's name is 'ShowDialog' and not 'showDialog'.
 
reference by value
You are right, nevertheless the method's name is 'ShowDialog' and not 'showDialog'.
Are YOU saying there is a difference between uper and lower case.

Brutus
:-)
Cor
 
Hi Sender,

Rather than call the Show method, you can call the ShowDialog
function. If I remember correctly, that will be modal within the
application, but it will not grab focus from another application.

HTH.
 
Hi Cor,


Yes there is when it comes to camel casing.

In my infinite wisdom, I hereby BAN all camel casing from appearing in any
of my posts, it will now appear as asterisks. I'm sure you'll agree
Herfried.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
Back
Top