You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/visual-basic/developing-apps/customizing-extending-my/customizing-which-objects-are-available-in-my.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,20 @@ helpviewer_keywords:
7
7
ms.assetid: 4e8279c2-ed5b-4681-8903-8a6671874000
8
8
---
9
9
# Customizing Which Objects are Available in My (Visual Basic)
10
+
10
11
This topic describes how you can control which `My` objects are enabled by setting your project's `_MYTYPE` conditional-compilation constant. The Visual Studio Integrated Development Environment (IDE) keeps the `_MYTYPE` conditional-compilation constant for a project in sync with the project's type.
11
12
12
-
## Predefined _MYTYPE Values
13
-
You must use the `/define` compiler option to set the `_MYTYPE` conditional-compilation constant. When specifying your own value for the `_MYTYPE` constant, you must enclose the string value in backslash/quotation mark (\\") sequences. For example, you could use:
13
+
## Predefined \_MYTYPE Values
14
+
15
+
You must use the `/define` compiler option to set the `_MYTYPE` conditional-compilation constant. When specifying your own value for the `_MYTYPE` constant, you must enclose the string value in backslash/quotation mark (\\") sequences. For example, you could use:
14
16
15
17
```
16
18
/define:_MYTYPE=\"WindowsForms\"
17
19
```
18
20
19
21
This table shows what the `_MYTYPE` conditional-compilation constant is set to for several project types.
20
22
21
-
|Project type|_MYTYPE value|
23
+
|Project type|\_MYTYPE value|
22
24
|------------------|--------------------|
23
25
|Class Library|"Windows"|
24
26
|Console Application|"Console"|
@@ -31,12 +33,13 @@ This topic describes how you can control which `My` objects are enabled by setti
31
33
|Empty|"Empty"|
32
34
33
35
> [!NOTE]
34
-
> All conditional-compilation string comparisons are case-sensitive, regardless of how the `Option Compare` statement is set.
36
+
> All conditional-compilation string comparisons are case-sensitive, regardless of how the `Option Compare` statement is set.
35
37
36
-
## Dependent _MY Compilation Constants
37
-
The `_MYTYPE` conditional-compilation constant, in turn, controls the values of several other `_MY` compilation constants:
38
+
## Dependent \_MY Compilation Constants
39
+
40
+
The `_MYTYPE` conditional-compilation constant, in turn, controls the values of several other `_MY` compilation constants:
@@ -50,7 +53,7 @@ This topic describes how you can control which `My` objects are enabled by setti
50
53
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.
51
54
52
55
> [!NOTE]
53
-
> 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.
56
+
> 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.
54
57
55
58
This table describes the effects of the predefined values of the `_MY` compilation constants.
Copy file name to clipboardExpand all lines: docs/visual-basic/developing-apps/customizing-extending-my/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ You can customize project templates to provide additional `My` objects. This mak
21
21
Describes how to specify your own extensions to the application model by overriding members of the <xref:Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase> class.
22
22
23
23
[Customizing Which Objects are Available in My](../../../visual-basic/developing-apps/customizing-extending-my/customizing-which-objects-are-available-in-my.md)
24
-
Describes how to control which `My` objects are enabled by setting your project's _MYTYPE conditional-compilation constant.
24
+
Describes how to control which `My` objects are enabled by setting your project's \_MYTYPE conditional-compilation constant.
25
25
26
26
## Related Sections
27
27
[Development with My](../../../visual-basic/developing-apps/development-with-my/index.md)
0 commit comments