Open second form in vs 2003

April 13, 2009 at 21:39:05
Specs: Windows XP
Using Visual Studio .NET 2003 - I am trying to open a second form based on user response to Yes/No Message Box. My code is as follows:

Dim MsgAnswer As Boolean
MsgAnswer = True
Dim MsgRes As DialogResult
Dim CustomerInfo1 As New Form

MsgRes = MessageBox.Show("Is this an existing customer?", "New Customer?", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)

If MsgRes = DialogResult.No Then
CustomerInfo1.ShowDialog()
End If

A form opens but it is blank not the one I designed.

HELP!! Thank you


See More: Open second form in vs 2003

Report •


#1
April 14, 2009 at 08:24:38
Dim CustomerInfo1 As New Form
Form is a blank form. If you want to show your form, spawn an instance of that; not the generic object Form.

Report •

#2
April 14, 2009 at 14:57:40
I am relatively new to programming and am not sure I understand what you are saying. I guess I am having a "bad brain day".

Report •

#3
April 15, 2009 at 06:04:54
*sigh*

What's the name of this second form?


Report •

Related Solutions

#4
April 20, 2009 at 07:34:08
CustomerInfo1

Report •

#5
April 20, 2009 at 08:57:24
Dim aForm As New CustomerInfo1
aForm.ShowDialog()


Report •


Ask Question