473,769 Members | 6,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5855
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.c om.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.c om.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.ShowDial og()

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

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:#U******** ******@TK2MSFTN GP09.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.c om.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.c om.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.ShowDial og()
\\\
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
1995
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 window to be alway on top (of my application). How can I do that ?
1
19070
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 question is if I want to start a System.Windows.Forms.Form via ShowDialog in another thread what is the best way to do it? Basically, I want to start a form, then continue executing elsewhere and occasionally posting data to the form. I know you...
2
6163
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. In this thread I want to show a special dialog box. Because the question must be answered, I'm using ShowDialog to display it. Just before doing so, I have some simple code to: - Center it in the main form, if that form is visible - Center it in...
4
1991
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, 'cuz it will open a new Form1, the new Form1 will get the value. And the original Form1 get nothing! What do I need to do to let the ORIGINAL Form1 get the target value? Any help will be highly appreciated.
4
9101
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 sequence: 1. The form is shown. The Form_Load event does some initialization. 2. Further parameters are passed to this form. 3. We actually need this form to be modal, so we hide it and show it again modally. 4. Stuff happens on the form based...
14
3774
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
5
10908
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 have a form that has a button. ( this form is a child form of a parent form ( main form ). Anway...in this child form I have a button, and if clicked a bunch of code will get executed. I would like to show a Progress Bar / form in modal/ShowDialog...
7
2636
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 sender, EventArgs e) { frmImportData ImportData = new frmImportData();
8
36137
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 button on it. If the query returns multiple results, a new window is opened with a grid containing the results. When the user double clicks on the desired row in the grid, I want the first form to populate with the correct data. I don't know how...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.