473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 5813
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mathieu Chavoutier | last post by:
Hi. I want to create a kind of configuration window. So, I have a main window, and when I click on a button, it opens a new form. But, because it is a configuration window, I would like that...
1
by: NanoWizard | last post by:
Enclosed below is a class that contains one member item called _frm. It is just a standard System.Windows.Forms.Form class defined elsewhere (just disregard the definition of the object). My...
2
by: Robert W. | last post by:
In my WinForms application, I have a main form, which may or may not be visible depending on the user's wishes. This main form initiates a separate thread that starts a data transfer process. ...
4
by: Jason Huang | last post by:
Hi, Thanks for help in advance! In Form1, I "New" a Form2 and ShowDialog the Form2, it's OK. My intention is passing a value from Form2 to Form1. However, in Form2, I shouldn't "New" a Form1,...
4
by: C M Shaw | last post by:
I have a form which I want to show modally; it's a fairly old form that's been ported up several versions of VB, and I'd like to keep its rewriting to a minimum. Basically, it is used in this...
14
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
7
by: Steve | last post by:
I have a method that creates of new form each time its called do i need to dipose of the form when it closes or doe the garbage collector take care of it? code private void button1_Click(object...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.