nibsy Posted August 15, 2003 Posted August 15, 2003 I have a parent form, from which i wish to open child forms. I am going to use the open dialog from a menu, using the following code. Private Sub mnuFileOpen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileOpen.Click If DlgOpen.ShowDialog = DialogResult.OK Then Dim oForm As New [color=red]frmView()[/color] oForm.mdiParent = Me oForm.Picture = Image.FromFile(DlgOpen.FileName) oForm.Show() End If End Sub However the highlighted text throws the message: Type 'frmView' is not defined. I am not too sure why. Thanks in-advance. Quote
*Gurus* divil Posted August 15, 2003 *Gurus* Posted August 15, 2003 It means there's no frmView defined in your project (or there is, but it's in a namespace that isn't imported). Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
nibsy Posted August 15, 2003 Author Posted August 15, 2003 Thanks Divil, I had called my child form something other than frmView() Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.