CJ7
CJ7

Reputation: 23275

Possible to access My.Forms object in VB.NET class library?

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

Upvotes: 4

Views: 808

Answers (1)

Szymon
Szymon

Reputation: 43023

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.

Upvotes: 3

Related Questions