Loading/Unloading Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne  Wengert

    #1

    Loading/Unloading Forms

    In VB6 I used to use frmForm1.Show to make a form visible to the user and
    then use Unload frmForm1 to unload it. I have an app in which I need to
    "load" and "unload" forms based on user actions. How do I do this in VB.NET?
    Just hiding a form won't do as I need the logic in the OnLoad event to
    execute when the form loads each time.

    --
    ------------------------------------
    Wayne Wengert
    wayne@wengert.o rg


  • Wayne  Wengert

    #2
    Re: Loading/Unloading Forms

    John;

    Thanks. I did not realize the .Close method was there

    Wayne

    "John Cottrell" <No@Spam.com> wrote in message
    news:08bc01c360 1d$ad8c3170$a50 1280a@phx.gbl.. .[color=blue]
    > You can use frmForm1.Close in .NET to actually close (i.e.
    > unload) a form. The Show method is also used in .NET,
    > although, you now have Show to load a modeless form and
    > ShowDialog to load a modal.
    >[color=green]
    > >-----Original Message-----
    > >In VB6 I used to use frmForm1.Show to make a form visible[/color]
    > to the user and[color=green]
    > >then use Unload frmForm1 to unload it. I have an app in[/color]
    > which I need to[color=green]
    > >"load" and "unload" forms based on user actions. How do I[/color]
    > do this in VB.NET?[color=green]
    > >Just hiding a form won't do as I need the logic in the[/color]
    > OnLoad event to[color=green]
    > >execute when the form loads each time.
    > >
    > >--
    > >------------------------------------
    > >Wayne Wengert
    > >wayne@wengert. org
    > >
    > >
    > >.
    > >[/color][/color]


    Comment

    • John Cottrell

      #3
      Re: Loading/Unloading Forms

      There are a lot of things like that in .NET. There's a
      very large section in the documentation that describes the
      differences between VB.NET and VB6. In the .NET help
      enter "Visual Basic, what's changed" in the "Look for:"
      prompt and the topic "Introducti on to Visual Basic .NET
      for Visual Basic Veterans" will be displayed.

      Good luck!
      [color=blue]
      >-----Original Message-----
      >John;
      >
      >Thanks. I did not realize the .Close method was there
      >
      >Wayne
      >
      >"John Cottrell" <No@Spam.com> wrote in message
      >news:08bc01c36 01d$ad8c3170$a5 01280a@phx.gbl. ..[color=green]
      >> You can use frmForm1.Close in .NET to actually close[/color][/color]
      (i.e.[color=blue][color=green]
      >> unload) a form. The Show method is also used in .NET,
      >> although, you now have Show to load a modeless form and
      >> ShowDialog to load a modal.
      >>[color=darkred]
      >> >-----Original Message-----
      >> >In VB6 I used to use frmForm1.Show to make a form[/color][/color][/color]
      visible[color=blue][color=green]
      >> to the user and[color=darkred]
      >> >then use Unload frmForm1 to unload it. I have an app in[/color]
      >> which I need to[color=darkred]
      >> >"load" and "unload" forms based on user actions. How[/color][/color][/color]
      do I[color=blue][color=green]
      >> do this in VB.NET?[color=darkred]
      >> >Just hiding a form won't do as I need the logic in the[/color]
      >> OnLoad event to[color=darkred]
      >> >execute when the form loads each time.
      >> >
      >> >--
      >> >------------------------------------
      >> >Wayne Wengert
      >> >wayne@wengert. org
      >> >
      >> >
      >> >.
      >> >[/color][/color]
      >
      >
      >.
      >[/color]

      Comment

      • Wayne  Wengert

        #4
        Re: Loading/Unloading Forms

        Thanks - will do!

        Wayne

        "John Cottrell" <No@Spam.com> wrote in message
        news:017401c360 29$2ce95280$a30 1280a@phx.gbl.. .[color=blue]
        > There are a lot of things like that in .NET. There's a
        > very large section in the documentation that describes the
        > differences between VB.NET and VB6. In the .NET help
        > enter "Visual Basic, what's changed" in the "Look for:"
        > prompt and the topic "Introducti on to Visual Basic .NET
        > for Visual Basic Veterans" will be displayed.
        >
        > Good luck!
        >[color=green]
        > >-----Original Message-----
        > >John;
        > >
        > >Thanks. I did not realize the .Close method was there
        > >
        > >Wayne
        > >
        > >"John Cottrell" <No@Spam.com> wrote in message
        > >news:08bc01c36 01d$ad8c3170$a5 01280a@phx.gbl. ..[color=darkred]
        > >> You can use frmForm1.Close in .NET to actually close[/color][/color]
        > (i.e.[color=green][color=darkred]
        > >> unload) a form. The Show method is also used in .NET,
        > >> although, you now have Show to load a modeless form and
        > >> ShowDialog to load a modal.
        > >>
        > >> >-----Original Message-----
        > >> >In VB6 I used to use frmForm1.Show to make a form[/color][/color]
        > visible[color=green][color=darkred]
        > >> to the user and
        > >> >then use Unload frmForm1 to unload it. I have an app in
        > >> which I need to
        > >> >"load" and "unload" forms based on user actions. How[/color][/color]
        > do I[color=green][color=darkred]
        > >> do this in VB.NET?
        > >> >Just hiding a form won't do as I need the logic in the
        > >> OnLoad event to
        > >> >execute when the form loads each time.
        > >> >
        > >> >--
        > >> >------------------------------------
        > >> >Wayne Wengert
        > >> >wayne@wengert. org
        > >> >
        > >> >
        > >> >.
        > >> >[/color]
        > >
        > >
        > >.
        > >[/color][/color]


        Comment

        Working...