Check out this way by using DialogResult (and passing data between forms or classes):
''' The main entry point for the application.
Private Shared Sub Main()
Dim loginData As String = ""
Dim l As Login = New Login
If (l.ShowDialog = DialogResult.OK) Then
'code returns form login (if you want you can get some data from there and pass it further:
loginData = l.MYPROPERTY
Public Class Login
Public Property MYPROPERTY As String
Public Sub New()
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
'and close login form (and pass data if you want)
MYPROPERTY = "hi from login"
Me.DialogResult = DialogResult.OK
Public Class Form1
Public Sub New(ByVal loginData As String)
'Do with the data what ever you want to...
Ill go with Mitja Bonca.
Don't open your Home Screen on Login form's button click event.
Make the login form to return the login status and check,
do appropriate actions(whether to open the home screen or to give user an error message) in the Main function.
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...