Default form initialization in vb.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kevin@inatrice.co.za

    Default form initialization in vb.net

    I found out today that vb.net 2005 will support 'Form1.Show()' without
    having to initialize the Form1 object as with the case
    in C# or the current version on vb.net.

    Isn't this going to be a step backwards for vb.net?

    Wouldn't this pose a problem?

    Any Thoughts?


    Kill me now if this has been discussed before.

  • Herfried K. Wagner [MVP]

    #2
    Re: Default form initialization in vb.net

    <kevin@inatrice .co.za> schrieb:[color=blue]
    >I found out today that vb.net 2005 will support 'Form1.Show()' without
    > having to initialize the Form1 object as with the case
    > in C# or the current version on vb.net.
    >
    > Isn't this going to be a step backwards for vb.net?[/color]

    <URL:http://www.google.de/search?q=bill+m ccarthy+default +instances>

    Personally I like 'My.Forms.<Form >' for accessing default instances, but I
    don't like that access is possible directly over the class name.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • kevin@inatrice.co.za

      #3
      Re: Default form initialization in vb.net

      When is the default instance created?
      When the app fires up or when you actually call a property or method on
      the particular form object?

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Default form initialization in vb.net

        <kevin@inatrice .co.za> schrieb:[color=blue]
        > When is the default instance created?
        > When the app fires up or when you actually call a property or method on
        > the particular form object?[/color]

        IIRC the form gets instantiated when the default instance is accessed for
        the first time.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        Working...