Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Form Loading and Using, problem, VB6 To VB.NET ?!? ...


Message #1 by "Tom Deseyn" <tom_deseyn@h...> on Sun, 7 Apr 2002 17:16:47 +0200
Essentially all your need to use are the 'show' and 'hide' methods of your 
various forms to do something like:
(in frmMain)
Sub Main()
    Dim frmLogin as New frmLogin ' create a new instance of the login form

    ' Display the login form as a dialog
    If frmLogin.showDialog(me) = DialogResult.OK Then
        ' they logged on OK
        me.show ' show the main form
    Else
        ' They didn't so do whatever you need to do eg. here you
        ' could test for whether they failed or clicked cancel etc

    End If
End Sub

Incidentally, Chapter 14 of Beginning Visual Basic .NET by Wrox as an 
example of this sort of thing, so perhaps grab the example code for that 
from the website?

Hope this helps
Cheers
Brett

  Return to Index