|
-
Aug 2nd, 2003, 02:14 AM
#1
Thread Starter
New Member
A real Newbie question about forms...
Sorry for this question I am sure it has come up a few times already bu anyway...
I am quite familiar with VB6 and have just install .Net.
All I am trying to do is close one form and open the next??
I seem to be able to open the next form ok but cant work out how to close the previous form behind it??
in VB6 this was simple eg:
Unload Me
Form2.Show
In .Net I have got as far as:
Public Class frmSplash
Inherits System.Windows.Forms.Form
Dim Test As Form
Private Sub pbxTitle01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxTitle01.Click
Test = New frmMainMenu()
Test.Show()
End Sub
End Class
But as soon as I try and use a "Close" it simply closes everything???
Can can someone point me in the right direction, sorry for the stupid question.
Regards
Merlyn
-
Aug 2nd, 2003, 04:13 AM
#2
Junior Member
Hi,
I had a similar problem last week and it nearly drove me mad.
In my case the problem was the button I clicked on form1 had a DialogResult property of Cancel, and this seemed to close the first form.
When I deleted the button and recreated it from scratch, the form worked okay. Maybe this might help you.
Also, check this link in VB.Net help for more details on showing forms:
ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbtskDisplayingModelessForm.htm
Best regards,
Liam.
-
Aug 2nd, 2003, 04:43 AM
#3
Thread Starter
New Member
Thanks Liam, will try it out...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|