1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Setting the Startup Form on Windows Application

Discussion in 'C#' started by seofighter, Jul 16, 2010.

  1. #1

    If you have multiple forms on Windows Application project, you can set the startup form using one of these methods based on what language you use. Unfortunately it depends on the programming language.
    * For Visual Basic projects, the startup form is set using the Project Properties dialog box. The Startup Object drop-down in this dialog box contains a list of all valid form objects. You simply select the form you want launched on startup, and you're all set.

    * For Visual C# projects, a slightly more complex approach is needed. The notion of a C# startup object is simply any class that implements a Main() method. Within the body of the Main method, you need to place a line of code that passes in a form instance to the Application.Run method, like this: Application.Run(new OrderForm()). Assuming that you have a class that implements Main and code that calls Application.Run in that Main method, you can then select the specific startup object via the Project Properties dialog box.
    seofighter, Jul 16, 2010 IP