Groups | Blog | Home
all groups > dotnet faqs > july 2005 >

dotnet faqs : What is differ between Application.Run and .ShowDialog() ?


Herfried K. Wagner [MVP]
7/29/2005 12:00:00 AM
"alex9128" <alex9128@hotmail.com> schrieb:
[quoted text, click to view]

In this particular situation 'Application.Run' is semantically correct, but
'ShowDialog' isn't, because the form should not be shown as a dialog.

[quoted text, click to view]

<URL:http://www.yoda.arachsys.com/csharp/faq/#one.application.instance>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
alex9128
7/29/2005 1:41:38 PM
Hi All,

I mean if you writing Sub Main in VB you can start you application either
way:

Dim mainfrm As Form1 = New Form1()
mainfrm.ShowDialog()

or just

Application.Run(New Form1())

What is advantage of each way? And how to count how many times user started
application and let do it only once? Looks like Shared property can't do it.

Alex


AddThis Social Bookmark Button