Reflection question

D

Davis

Hi, i have a frmMain which is the main form of my PPC03 app when
it starts. It has a button control, in the button controls event handler
another form frmMenu is loaded which has been declared local to the event
handler and instantiated in the event handler.

ie
Private Sub button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button.Click

Dim objMenu As New frmMenu
objMenu.Show

EndSub


If i load the assembly then get an instance of frmMain using Reflection
is it possible to access the objMenu form. Or does the objMenu actually
need to be a field or property of frmMain as opposed to local variable.

Thanks
 
D

Daniel Moth

Yes it needs to be a field.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

Hi, i have a frmMain which is the main form of my PPC03 app when
it starts. It has a button control, in the button controls event handler
another form frmMenu is loaded which has been declared local to the event
handler and instantiated in the event handler.

ie
Private Sub button_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles button.Click

Dim objMenu As New frmMenu
objMenu.Show

EndSub


If i load the assembly then get an instance of frmMain using Reflection
is it possible to access the objMenu form. Or does the objMenu actually
need to be a field or property of frmMain as opposed to local variable.

Thanks
 

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

Similar Threads


Top