My in Different Applications
Now that you know how My can be customized, you can easily understand why different kinds of Visual Basic applications have their own customizations, provided by the IDE. For example, Windows Forms applications provide a My.Forms property that allows access to forms instances, as follows:
Dim oneForm As Form1 = My.Forms.Form1
This is mainly due to the support offered in code by the My namespace to the Application Framework feature. This feature allows executing special tasks at the beginning and at the end of the application lifetime, such as showing splash screens or establishing what form is the main application form. In Windows Forms applications the application framework is enabled by default, and you can get ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access