First Main Form quick question.


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
 
Ad

Advertisements

Ad

Advertisements

M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top