Q
Problem solve Get help with specific problems with your technologies, process and projects.

How do you reference a form control from a module?

How do you reference a form control from a module? This is something that should be easy to do but it's nowhere in the documentation. This is what I've tried so far:

Dim objfrmMain as form
objfrmMain = New frmMain
objfrmMain.control ?????????
Since form controls are declared with Friend scope in VB.NET, you are probably running into the issue that those controls can only be accessed from code inside the same assembly. The documentation is quite clear about the Friend levels of recognition.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close