Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27508

VS 2010 Help with multiple Forms

$
0
0
Hello All,

I had an application that it's startup form is Form1
Form1 has a public variable called CurrFileNum (integer)
Form1 calls frmCustomersList form. frmCustomersList dsplays a list of customers. when the user choses a customer, the frmCustomersList assingns in Form1.CurrFileNum the customers num and closes.
Form1 moves to the customer that his num was assigend by frmCustomersList.

This worked perfictly.

Then I changed the startup form to frmLogin. frmLogin Checks username and password. if the information is correct, frmLogin loads Form1 and closes itself.
Code:
Dim newfrm As New Form1
newfrm.Show()
Me.Close()

NO OTHER CHANGES WERE MADE :ehh:

The problem:
after these changes (the startup form) the frmCustomersList form does'nt assign the customer num in CurrFileNum which keeps the value 0 always (the value given in decliration).

:cry: Please Help Me Solve The Problem :cry:

Thanx :wave:

Viewing all articles
Browse latest Browse all 27508

Trending Articles