470,632 Members | 2,706 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Form.Showdialog question

Jm
Hi all

Im not sure of the best way to be displaying my forms and just want a bit of
clarification. Being only recently moved to vb.net im still used to the old
vb6 form.show method, now under vb.net that doesnt seem to do alot most of
the time so far as i can tell. So im using form.showdialog all the time. But
it seems as though once i call this code, all control transfers to the open
form and only when closed the control returns to the original code and it
the proceeds. Im hoping im right so far and this doesnt sound really stupid
and wrong. So what im wondering is, is there a way to open a form and let it
run its code but to move on while the form is still open with the original
code ? Or is this not possilbe. Any help is greatly appreciated

Thanks
Nov 21 '05 #1
4 5664
Hi,

ShowDialog displays the form and waits until it is closed.
Show displays the form.

Not sure what you mean form.show doesnt seem to do alot most of
the time so far as i can tell.

Ken
-------------------------------------
"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

Im not sure of the best way to be displaying my forms and just want a bit of
clarification. Being only recently moved to vb.net im still used to the old
vb6 form.show method, now under vb.net that doesnt seem to do alot most of
the time so far as i can tell. So im using form.showdialog all the time. But
it seems as though once i call this code, all control transfers to the open
form and only when closed the control returns to the original code and it
the proceeds. Im hoping im right so far and this doesnt sound really stupid
and wrong. So what im wondering is, is there a way to open a form and let it
run its code but to move on while the form is still open with the original
code ? Or is this not possilbe. Any help is greatly appreciated

Thanks

Nov 21 '05 #2
Hi,

In VB6 you had:

frm.Show, frm.Show 0 or frm.Show vbModeless: this opens the form in a
modeless way.
frm.Show 1 or frm.Show vbModal: this opens the form in a modal way.

In VB.NET you have:

frm.Show: this opens the form in a modeless way.
frm.ShowDialog: this opens the form in a modal way.

So, if you were using frm.Show, you should use it instead of frm.ShowDialog
since you don´t want modal dialogs.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code and design much faster.
http://www.mztools.com
"Jm" <ja*****@ihug.com.au> escribió en el mensaje
news:cr**********@lust.ihug.co.nz...
Hi all

Im not sure of the best way to be displaying my forms and just want a bit
of
clarification. Being only recently moved to vb.net im still used to the
old
vb6 form.show method, now under vb.net that doesnt seem to do alot most of
the time so far as i can tell. So im using form.showdialog all the time.
But
it seems as though once i call this code, all control transfers to the
open
form and only when closed the control returns to the original code and it
the proceeds. Im hoping im right so far and this doesnt sound really
stupid
and wrong. So what im wondering is, is there a way to open a form and let
it
run its code but to move on while the form is still open with the original
code ? Or is this not possilbe. Any help is greatly appreciated

Thanks

Nov 21 '05 #3
Jm
Hi Ken

Sorry, should have clarified that a bit further, meant to say when running
from inside a service program. Is there any special way to be using the
forms, im basically saying:

Dim myForm As New Form1
myForm.ShowDialog()

and if i were to use Show i just replace the ShowDialog() ?

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:#U**************@TK2MSFTNGP09.phx.gbl...
Hi,

ShowDialog displays the form and waits until it is closed.
Show displays the form.

Not sure what you mean form.show doesnt seem to do alot most of
the time so far as i can tell.

Ken
-------------------------------------
"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

Im not sure of the best way to be displaying my forms and just want a bit of clarification. Being only recently moved to vb.net im still used to the old vb6 form.show method, now under vb.net that doesnt seem to do alot most of
the time so far as i can tell. So im using form.showdialog all the time. But it seems as though once i call this code, all control transfers to the open form and only when closed the control returns to the original code and it
the proceeds. Im hoping im right so far and this doesnt sound really stupid and wrong. So what im wondering is, is there a way to open a form and let it run its code but to move on while the form is still open with the original
code ? Or is this not possilbe. Any help is greatly appreciated

Thanks

Nov 21 '05 #4
"Jm" <ja*****@ihug.com.au> schrieb:
Sorry, should have clarified that a bit further, meant to say when running
from inside a service program. Is there any special way to be using the
forms, im basically saying:

Dim myForm As New Form1
myForm.ShowDialog()
\\\
myForm.Dispose()
///
and if i were to use Show i just replace the ShowDialog() ?


Yes... But showing forms from within a service program is not recommended.
Instead, write a client/controller application that communicates with the
service over sockets, remoting or events and displays the GUI.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mathieu Chavoutier | last post: by
1 post views Thread by NanoWizard | last post: by
2 posts views Thread by Robert W. | last post: by
14 posts views Thread by Simon Abolnar | last post: by
7 posts views Thread by Steve | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.