According to MSDN, it My.Forms is only available if your project type is a Windows application. It is not available for other types of projects, including a class library.
Also note that
the My.Forms object provides only the forms associated with the current project.
, Windows Application, , .