Application.Run Method


Application.Run Method

Class

System.Windows.Forms.Application

Syntax

     Application.Run(mainForm) 


mainForm (required; Windows.Forms.Form)

The form to use as the main form of the new application on the current thread

Other syntax variations are available.

Description

The Run method starts a new application on the current thread, specifying the main form to display and use as the basis of the application. This is a common way of starting a Windows Forms application.

Example

     Module GeneralCode        Public Sub Main(  )           ' ----- Starts the application.           Application.Run(New Form1)        End Sub     End Module 

Version Differences

Visual Basic 2005 includes new features that let you show the main form of an application with a syntax more familiar to VB 6 developers. See the My.Forms Object entry in Chapter 13 for additional information.

See Also

Application Class




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net