PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

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

 
 
alex9128
Guest
Posts: n/a
 
      29th Jul 2005
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



 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      29th Jul 2005
"alex9128" <(E-Mail Removed)> schrieb:
> 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?


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

> And how to count how many times user started
> application and let do it only once?


<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/>

 
Reply With Quote
 
 
 
 
hB
Guest
Posts: n/a
 
      10th Aug 2005
Dialog is model window other is modless.
if there are more than one gui forms/windows then it would effect.

"What is advantage of each way? And how to count how many times user
started application"
Perhaps on Application.Exit and Start of app, manipulate this
information in some text file.

---
hB

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make-table results differ between View and Run Ansible Microsoft Access Queries 0 7th Jan 2009 10:01 PM
Page Numbering when pages differ between Landscape and Portrait LindaB Microsoft Word Document Management 2 15th May 2008 03:05 PM
Results differ between Windows App and Console App. Why??? Hexman Microsoft VB .NET 7 29th Jun 2006 04:39 PM
How to differ between received and sent email programmatically Darius Microsoft Outlook Program Addins 3 6th Apr 2006 08:06 PM
What is differ between Application.Run and .ShowDialog() ? alex9128 Microsoft Dot NET 2 10th Aug 2005 11:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:34 PM.