Hello,
I am getting more and more confused with the command me.hide() , me.close() and me.dispose() when using with CurrentForm.ShowDialog().
My problem is as follows;
I have a form (MainForm.vb) that contain 3 Buttons;
1. First one is for Adding a user name
2. Second one for Modifying the password.
3. Third one for Deleting a user name and password.
I have been able to work out each one above with successful connection to the Database at runtime.
When the first button is clicked another form is open(called AdminPass.vb) whereby the user need to enter a password to get access to Password_Util.vb form. I have used {below} in the Private Sub But...Click...;
CurrentForm = New AdminPass()
CurrentForm.ShowDialog()
End Sub
When i am in AdminPass.vb and i have successfully entered the password, i want the AdminPass.vb to close and the Password_Util.vb to open. I have used the following code;
Me.Hide()
CurrentForm = New Password_Util()
CurrentForm.Show()
It is at this point that i am having problem. The Adminpass.vb form disappear and my new form Password_Util is opened BUT WITH THE Mainform.vb also ( in other words, i can work on 2 forms ).
What must i use in my code to close the form that i am not using and have my current form ONLY ?
Thank you
Salim
I am getting more and more confused with the command me.hide() , me.close() and me.dispose() when using with CurrentForm.ShowDialog().
My problem is as follows;
I have a form (MainForm.vb) that contain 3 Buttons;
1. First one is for Adding a user name
2. Second one for Modifying the password.
3. Third one for Deleting a user name and password.
I have been able to work out each one above with successful connection to the Database at runtime.
When the first button is clicked another form is open(called AdminPass.vb) whereby the user need to enter a password to get access to Password_Util.vb form. I have used {below} in the Private Sub But...Click...;
CurrentForm = New AdminPass()
CurrentForm.ShowDialog()
End Sub
When i am in AdminPass.vb and i have successfully entered the password, i want the AdminPass.vb to close and the Password_Util.vb to open. I have used the following code;
Me.Hide()
CurrentForm = New Password_Util()
CurrentForm.Show()
It is at this point that i am having problem. The Adminpass.vb form disappear and my new form Password_Util is opened BUT WITH THE Mainform.vb also ( in other words, i can work on 2 forms ).
What must i use in my code to close the form that i am not using and have my current form ONLY ?
Thank you
Salim