Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dim frm0 as frmMainMdi

Dim frm1 As New frmAsset_new

frm1.MdiParent = frm0

frm1.Show()

Me.Close()

 

 

Boys and Girls it is obvious that i am no genius but can anyone explain why i cannot frmAsset_new as a Mdi child under frm0 i. i seem to only to be able to do it using either the menu item click ..... with frm1.Mdiparent = me..... is there a variable i could use that will aloow me do this? thanks guys :confused: :confused: :confused:

Posted

Yes i have an instance open......

 

The MDi parent is already open so i dont need to create a new instance of it. The problem seems to be using variables to reference the mdi parent i.e.

 

frm1.mdiparent = frm0

 

if i was writting the code on the frmMainMdi it would not have this problem because i would not use a variable i would use "me" ,,,,, :confused: guys pls get back to me..... i am dieing here.

Posted

If this from you are opening the from from is a MIDIchild to your MDIForm the solution is easy.

 

Dim frm1 As New frmAsset_new
frm1.MdiParent = me.MdiParent
frm1.Show()
Me.Close()

 

If not you�ll need a way to store the MDI parent in the form (create a property) and use that one for reference.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...