
Dependent _MY Compilation Constants
The _MYTYPE conditional-compilation constant, in turn, controls the values of several other _MY compilation constants:
_MYTYPE
|
_MYAPPLICATIONTYPE
|
_MYCOMPUTERTYPE
|
_MYFORMS
|
_MYUSERTYPE
|
_MYWEBSERVICES
|
|---|
"Console"
|
"Console"
|
"Windows"
|
Undefined
|
"Windows"
|
TRUE
|
"Custom"
|
Undefined
|
Undefined
|
Undefined
|
Undefined
|
Undefined
|
"Empty"
|
Undefined
|
Undefined
|
Undefined
|
Undefined
|
Undefined
|
"Web"
|
Undefined
|
"Web"
|
FALSE
|
"Web"
|
FALSE
|
"WebControl"
|
Undefined
|
"Web"
|
FALSE
|
"Web"
|
TRUE
|
"Windows" or ""
|
"Windows"
|
"Windows"
|
Undefined
|
"Windows"
|
TRUE
|
"WindowsForms"
|
"WindowsForms"
|
"Windows"
|
TRUE
|
"Windows"
|
TRUE
|
"WindowsFormsWithCustomSubMain"
|
"Console"
|
"Windows"
|
TRUE
|
"Windows"
|
TRUE
|
By default, undefined conditional-compilation constants resolve to FALSE. You can specify values for the undefined constants when compiling your project to override the default behavior.
Note: |
|---|
When
_MYTYPE is set to "Custom", the project contains the My namespace, but it contains no objects. However, setting _MYTYPE to "Empty" prevents the compiler from adding the My namespace and its objects.
|
This table describes the effects of the predefined values of the _MY compilation constants.
Constant
|
Meaning
|
|---|
_MYAPPLICATIONTYPE
|
Enables My.Application, if the constant is "Console," Windows," or "WindowsForms":
The "Console" version derives from ConsoleApplicationBase. and has fewer members than the "Windows" version.
The "Windows" version derives from ApplicationBase.and has fewer members than the "WindowsForms" version.
The "WindowsForms" version of My.Application derives from WindowsFormsApplicationBase. If the TARGET constant is defined to be "winexe", then the class includes a Sub Main method.
|
_MYCOMPUTERTYPE
|
Enables My.Computer, if the constant is "Web" or "Windows":
The "Web" version derives from ServerComputer, and has fewer members than the "Windows" version.
The "Windows" version of My.Computer derives from Computer.
|
_MYFORMS
|
Enables My.Forms, if the constant is TRUE.
|
_MYUSERTYPE
|
Enables My.User, if the constant is "Web" or "Windows":
|
_MYWEBSERVICES
|
Enables My.WebServices, if the constant is TRUE.
|
_MYTYPE
|
Enables My.Log, My.Request, and My.Response, if the constant is "Web".
|