4

Is it possible to access the My.Forms object in a VB.NET class library?

Ref: http://msdn.microsoft.com/en-us/library/87y2hdsf(v=vs.80).aspx

Similar question here: http://vbcity.com/forums/t/146962.aspx

1 Answer 1

3

According to MSDN My.Forms is only available if your project type is Windows Application. It's not available for other project types, including class library.

Also, please note that

the My.Forms object exposes only the forms associated with the current project.

So when you use it in a Windows Application project, it will only give you access to forms created within the same project.

Sign up to request clarification or add additional context in comments.

1 Comment

Updated my answer to clarify that My.Forms isn't in fact available in a class library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.