First Main Form quick question.

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

Without using this:
For Each currentForm As Form In My.Application.OpenForms

or using something like me.mdi parent

how can i reference the main form's form variable.

Example:
If i open another form I can say:
dim bla as new frmForm2

i can now do bla.windowstate = blajsdfkljdslkjf

how can I ( in a submost form that is like 3 windows deep say somethign
like )

frmMainForm.minimize

its the frmMainForm variable I am having trouble with - since I dont
actaully define the first variable i dont have a reference to it.

I suppose I can make a public variable and when the main window opens put
the mainform's reference into it, but wondering if vb.net already has an
internal variable that holds the 'first' main form.

Thanks,

Miro
 
Thank you James,

Thats exactly what I ended up doing, in the end.

However this article was helpful as I created a public module and not a
friend module.

Thank you,

Miro
 
Back
Top