473,657 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between Show and ShowDialog?

I have a windows form, and it seems that I can use either Show or
ShowDialog to get it displayed. I wish to know the difference between
the two methods. Thanks!
Oct 6 '08 #1
2 12444
if you show your form with show, it will put it on the screen and then
program will continue on the next line as for showdialog will put it on the
screen and wait for a close command.

It's the difference between a modal and modeless form.

2 second google gave me:
http://msdn.microsoft.com/en-us/libr...dh(VS.80).aspx

gr,
Eric

"Curious" <fi********@yah oo.comschreef in bericht
news:d7******** *************** ***********@m74 g2000hsh.google groups.com...
>I have a windows form, and it seems that I can use either Show or
ShowDialog to get it displayed. I wish to know the difference between
the two methods. Thanks!

Oct 6 '08 #2
Hi Eric,

Thanks! This info is useful.
Oct 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1597
by: Homa | last post by:
Hi I'm working on a program that will have 3 forms: a main form, a status form and a sub-form. The main form and status form are always appear, and my sub-form is a singleton (for performance issue). As usual, I have two ways to display the sub-form: Show() and ShowDialog().
5
10963
by: AlexGray | last post by:
Hi, I created a blank Form with one Label, and the Label's text says "Loading... Please wait.". I display this form in Main() with Show() while i do some lengthy initialization stuff (ie loading files), but the Label appears transparent! I can see through to my desktop where the Label control is. But, if i display this form with ShowDialog(), it displays the label fine. Am I missing something here? Here is the code:
8
6438
by: MV | last post by:
Why can't I run .Show() on a System.Windows.Forms object from a Class? The code works fine if i run it from an other form. The form gets visible but no controls are loaded and the mouse pointer is an hourglass. ..ShowDialog() works fine.
3
6767
by: Ivan Weiss | last post by:
I have been using form.show to display my forms yet I see a lot of people using form.Showdialog. What are the differences and when is one better than the other or are they the same...? -Ivan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
20
2433
by: ed | last post by:
Hi I can't seem to make the Me.Show() work My code is dim dlgresult as dialogresul dlgresult=me.show( The message is : "expression does not produce a value
1
1268
by: Darin | last post by:
I have many forms in an MDI application. Sometimes I show FORMA just by a f.Show, other times it is f.ShowDialog. How can I tell within the form code whether this form is shown via Show or ShowDialog??? TIA *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
3
1118
by: Agnes | last post by:
I got a login form . When user input the correct password, the Main menu will be shown.Everything works under .net 2003. however, after complie under 2005, Same program runs, the main menu didn't show. I use debugger to check , the process is hold during "frmMain.showdialog() " and then done nothing . Please Help ~~`
4
12374
by: randy1200 | last post by:
I have a SideForm. If the use presses a button on the main form, the side form comes up by executing the following: SideForm sf = new SideForm() sf.ShowDialog(); This works perfectly. I've been asked to change the code to the following:
4
5211
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash on the new thread and put the main thread to sleep until the splash screen has done the business, then i kill the new thread and start another to show the login and again put the main one to sleep. Problem i have is that my splash screen will show...
0
8385
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
8303
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,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7316
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...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1941
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.