469,612 Members | 1,940 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Open new form in "modal" style...

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...)

Nov 20 '05 #1
14 22803
frm.showDialog
"I_AM_DON_AND_YOU?" <us**@domain.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
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...)

Nov 20 '05 #2
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
"I_AM_DON_AND_YOU?" <us**@domain.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
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...)

Nov 20 '05 #3
* "CJ Taylor" <no****@blowgoats.com> scripsit:
frm.showDialog


'showDialog'... we are not using Java...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
but it works...

I used this:
frm.showdialog()

and it opened in "modal" form....
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "CJ Taylor" <no****@blowgoats.com> scripsit:
frm.showDialog


'showDialog'... we are not using Java...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
* "I_AM_DON_AND_YOU?" <us**@domain.com> scripsit:
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'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
are you saying the difference is in the UPPER "S" and LOWER "s" ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "I_AM_DON_AND_YOU?" <us**@domain.com> scripsit:
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'.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #7
No...

Just getting a rise out of me. =)

Thanks Herfried. =)

CJ

"I_AM_DON_AND_YOU?" <us**@domain.com> wrote in message
news:Oq**************@TK2MSFTNGP12.phx.gbl...
are you saying the difference is in the UPPER "S" and LOWER "s" ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "I_AM_DON_AND_YOU?" <us**@domain.com> scripsit:
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'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


Nov 20 '05 #8
Cor

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
Nov 20 '05 #9
* "Cor" <no*@non.com> scripsit:
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
:-)


ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10
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.

--
Steph Zielenski
Nov 20 '05 #11
What is ROFL ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Cor" <no*@non.com> scripsit:
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
:-)


ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #12
Hehe

Rolling On Floor Laughing...

us nerds...
=)
"I_AM_DON_AND_YOU?" <us**@domain.com> wrote in message
news:OA*************@TK2MSFTNGP12.phx.gbl...
What is ROFL ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Cor" <no*@non.com> scripsit:
> 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
:-)


ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


Nov 20 '05 #13
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
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader20.wxs.nl...

reference by value
You are right, nevertheless the method's name is 'ShowDialog' and not

'**********'.

Are YOU saying there is a difference between uper and lower case.

Brutus
:-)
Cor

Nov 20 '05 #14
Hi Don,

Great name - You're not going to miss that in a search!!

;-)

Regards,
Fergus
Nov 20 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Steph. | last post: by
2 posts views Thread by Stu | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.