mansoor.live
New member
- Joined
- Dec 11, 2013
- Messages
- 4
- Programming Experience
- 5-10
hello experts i am new in vb.net and don't have too much experience .
i have a scenario that :
form 1 = main menu
form 2 = daily transactions
i am using mdi-application
i am on daily transaction form and i have home button, when i press this home button it automatically close current (daily transaction) form and open main menu form ..
how can i achieve this.
i tried this code but it throw exception.
Help Would Be Appriciated.
i have a scenario that :
form 1 = main menu
form 2 = daily transactions
i am using mdi-application
i am on daily transaction form and i have home button, when i press this home button it automatically close current (daily transaction) form and open main menu form ..
how can i achieve this.
i tried this code but it throw exception.
VB.NET:
Function checkForm()
Dim fc As FormCollection = Application.OpenForms
Dim FormFound As Boolean = False
For Each frm As Form In fc
If frm.Name = "main_Menu" Then
frm.Focus()
FormFound = True
End If
If frm.Name = "DailyTransactions" Then
FormFound = True
frm.Dispose()
End If
Next
If FormFound = False Then
Dim f As New main_Menu()
f.MdiParent = Me
f.Show()
End If
End Function
Help Would Be Appriciated.