Skip to content

Commit f1059db

Browse files
authored
Update IE references in Windows Forms (#8940)
1 parent d63c359 commit f1059db

17 files changed

+128
-259
lines changed

xml/System.Windows.Forms/Application.xml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,10 @@
488488
<format type="text/markdown"><![CDATA[
489489
490490
## Remarks
491-
This method enables visual styles for the application. Visual styles are the colors, fonts, and other visual elements that form an operating system theme. Controls will draw with visual styles if the control and the operating system support it. To have an effect, <xref:System.Windows.Forms.Application.EnableVisualStyles> must be called before creating any controls in the application; typically, <xref:System.Windows.Forms.Application.EnableVisualStyles> is the first line in the `Main` function. A separate manifest is not required to enable visual styles when calling <xref:System.Windows.Forms.Application.EnableVisualStyles>.
491+
This method enables visual styles for the application. Visual styles are the colors, fonts, and other visual elements that form an operating system theme. Controls will draw with visual styles if the control and the operating system support it. To have an effect, <xref:System.Windows.Forms.Application.EnableVisualStyles> must be called before creating any controls in the application; typically, <xref:System.Windows.Forms.Application.EnableVisualStyles> is the first line in the `Main` function. A separate manifest is not required to enable visual styles when calling <xref:System.Windows.Forms.Application.EnableVisualStyles>.
492492
493493
> [!NOTE]
494-
> Prior to the .NET Framework 2.0, the `FlatStyle` property of some controls, such as controls that derive from <xref:System.Windows.Forms.ButtonBase>, had to be set to <xref:System.Windows.Forms.FlatStyle.System?displayProperty=nameWithType> in order for the controls to be drawn with visual styles. In applications written with the .NET Framework 2.0, this is no longer necessary.
495-
496-
> [!NOTE]
497-
> This method will have no effect for controls hosted in Internet Explorer.
498-
499-
494+
> This method has no effect for controls hosted in Internet Explorer.
500495
501496
## Examples
502497
The following code example demonstrates calling <xref:System.Windows.Forms.Application.EnableVisualStyles%2A> in the `Main` function to enable visual styles for the application.
@@ -1635,22 +1630,20 @@
16351630
<format type="text/markdown"><![CDATA[
16361631
16371632
## Remarks
1638-
Certain Windows Forms controls can render their text using either the <xref:System.Windows.Forms.TextRenderer> class, which is based on the GDI graphics library, or the <xref:System.Drawing.Graphics> class, which is based on the GDI+ graphics library. This change was made in the .NET Framework 2.0 because of performance and localization issues with GDI+. Use <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> to set the default value of the `UseCompatibleTextRendering` property for controls that support it.
1639-
1640-
The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the <xref:System.Windows.Forms.TextRenderer> class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the <xref:System.Drawing.Graphics> class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`.
1633+
Certain Windows Forms controls can render their text using either the <xref:System.Windows.Forms.TextRenderer> class, which is based on the GDI graphics library, or the <xref:System.Drawing.Graphics> class, which is based on the GDI+ graphics library. This change was made in .NET Framework 2.0 because of performance and localization issues with GDI+. Use <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> to set the default value of the `UseCompatibleTextRendering` property for controls that support that property.
16411634
1642-
The GDI based <xref:System.Windows.Forms.TextRenderer> class was introduced in the .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of the .NET Framework, the GDI+ based <xref:System.Drawing.Graphics> class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the <xref:System.Drawing.Graphics> class to render text, this could cause the text for controls that use <xref:System.Windows.Forms.TextRenderer> to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> method with a parameter of `true`.
1635+
The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the <xref:System.Windows.Forms.TextRenderer> class and apps that perform custom text rendering using the <xref:System.Drawing.Graphics> class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`.
16431636
1644-
You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications.
1637+
The GDI-based <xref:System.Windows.Forms.TextRenderer> class was introduced in .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of .NET Framework, the GDI+ based <xref:System.Drawing.Graphics> class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the <xref:System.Drawing.Graphics> class to render text, this could cause the text for controls that use <xref:System.Windows.Forms.TextRenderer> to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> method with an argument of `true`.
16451638
1646-
1639+
You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications.
16471640
16481641
## Examples
16491642
16501643
> [!IMPORTANT]
16511644
> To set the default value for `UseCompatibleTextRendering` in Visual Basic 2005 or later, see <xref:Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.UseCompatibleTextRendering%2A?displayProperty=nameWithType>.
16521645
1653-
In Visual C# 2005 or later, a call to <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> is automatically generated in the Program.cs file. To change the text rendering default, modify the generated code.
1646+
For C# apps, Visual Studio automatically adds a call to <xref:System.Windows.Forms.Application.SetCompatibleTextRenderingDefault%2A> in the *Program.cs* file. To change the text rendering default, modify the generated code.
16541647
16551648
```csharp
16561649
static class Program

xml/System.Windows.Forms/DataGridViewLinkCell.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@
108108
<format type="text/markdown"><![CDATA[
109109
110110
## Remarks
111-
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.ActiveLinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
112-
113-
111+
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.ActiveLinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
114112
115113
## Examples
116114
The following code example demonstrates the use of the <xref:System.Windows.Forms.DataGridViewLinkColumn.ActiveLinkColor%2A?displayProperty=nameWithType> property, which is similar to this property. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.
@@ -550,9 +548,7 @@
550548
<format type="text/markdown"><![CDATA[
551549
552550
## Remarks
553-
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.LinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
554-
555-
551+
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.LinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
556552
557553
## Examples
558554
The following code example demonstrates the use of the <xref:System.Windows.Forms.DataGridViewLinkColumn.LinkColor%2A?displayProperty=nameWithType> property, which is similar to this property. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.
@@ -1168,9 +1164,7 @@
11681164
<format type="text/markdown"><![CDATA[
11691165
11701166
## Remarks
1171-
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.VisitedLinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
1172-
1173-
1167+
Setting the <xref:System.Windows.Forms.DataGridViewLinkColumn.VisitedLinkColor%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
11741168
11751169
## Examples
11761170
The following code example demonstrates the use of the <xref:System.Windows.Forms.DataGridViewLinkColumn.VisitedLinkColor%2A?displayProperty=nameWithType> property, which is similar to this property. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.

xml/System.Windows.Forms/DataGridViewLinkColumn.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@
133133
<format type="text/markdown"><![CDATA[
134134
135135
## Remarks
136-
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
137-
138-
136+
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.ActiveLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
139137
140138
## Examples
141139
The following code example initializes the <xref:System.Windows.Forms.DataGridViewLinkColumn.ActiveLinkColor%2A> property so that the link turns white when the user selects it. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.
@@ -341,9 +339,7 @@
341339
<format type="text/markdown"><![CDATA[
342340
343341
## Remarks
344-
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
345-
346-
342+
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.LinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
347343
348344
## Examples
349345
The following code example initializes this property to blue. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.
@@ -587,9 +583,7 @@
587583
## Remarks
588584
If the <xref:System.Windows.Forms.DataGridViewLinkColumn.TrackVisitedState%2A> property is set to false, the <xref:System.Windows.Forms.DataGridViewLinkColumn.VisitedLinkColor%2A> property is ignored.
589585
590-
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
591-
592-
586+
Getting or setting this property gets or sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewLinkColumn.CellTemplate%2A> property. Setting this property also sets the <xref:System.Windows.Forms.DataGridViewLinkCell.VisitedLinkColor%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
593587
594588
## Examples
595589
The following code example initializes this property so that the link is yellow-green if the user has visited it. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridViewComboBoxColumn> class overview topic.

xml/System.Windows.Forms/HtmlDocument.xml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
2929
HTML tags inside of an HTML document can be nested inside one another. <xref:System.Windows.Forms.HtmlDocument> thus represents a document tree, whose children are instances of the <xref:System.Windows.Forms.HtmlElement> class. The following code example shows a simple HTML file.
3030
31-
```
31+
```html
3232
<HTML>
3333
<BODY>
3434
<DIV name="Span1">Simple HTML Form</DIV>
@@ -479,7 +479,7 @@
479479
<format type="text/markdown"><![CDATA[
480480
481481
## Remarks
482-
`elementTag` may be one of any of the supported HTML tags in Internet Explorer, except for `FRAME` or `IFRAME`.
482+
`elementTag` may be any of the supported HTML tags in Internet Explorer except for `FRAME` and `IFRAME`.
483483
484484
<xref:System.Windows.Forms.HtmlDocument.CreateElement%2A> returns an element unattached to the current document tree. To add the element to the document, use either the <xref:System.Windows.Forms.HtmlElement.InsertAdjacentElement%2A> or <xref:System.Windows.Forms.HtmlElement.AppendChild%2A> methods.
485485
@@ -641,9 +641,7 @@
641641
## Remarks
642642
<xref:System.Windows.Forms.HtmlDocument> is a wrapper for the Internet Explorer Document Object Model (DOM), which is written in COM. If you need to access unexposed properties or methods on the underlying COM interfaces, such as `IHTMLDocument2`, you can use this object to query for them.
643643
644-
To use the unmanaged interfaces, import the MSHTML library (mshtml.dll) into your application. However, you can also execute unexposed properties and methods using the `IDispatch::Invoke` method.
645-
646-
644+
To use the unmanaged interfaces, import the MSHTML library (mshtml.dll) into your application. However, you can also execute unexposed properties and methods using the `IDispatch::Invoke` method.
647645
648646
## Examples
649647
The following code example casts the <xref:System.Windows.Forms.HtmlDocument.DomDocument%2A> to an `IHTMLDocument2` pointer and displays the value of the `lastModified` property, which tells when the owner of the document last updated its contents. The code example requires that you have a <xref:System.Windows.Forms.Button> on your form named `Button6`.
@@ -1237,14 +1235,12 @@ window.alert("Name is " + name + "; address is " + address);
12371235
12381236
You may call any function written in any Active Scripting language installed on the user's computer, including JScript and VBScript.
12391237
1240-
The <xref:System.Windows.Forms.HtmlDocument.InvokeScript%2A> will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it.
1241-
1242-
1238+
The <xref:System.Windows.Forms.HtmlDocument.InvokeScript%2A> will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it.
12431239
12441240
## Examples
12451241
The following code example executes the contents of a script in a Web page. The code example requires that you have a <xref:System.Windows.Forms.WebBrowser> in your application called `WebBrowser1`, and that you have loaded the following Web page.
12461242
1247-
```
1243+
```html
12481244
<HTML>
12491245
12501246
<HEAD>
@@ -1276,8 +1272,7 @@ window.alert("Name is " + name + "; address is " + address);
12761272
12771273
</BODY>
12781274
1279-
</HTML>
1280-
1275+
</HTML>
12811276
```
12821277
12831278
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet12":::
@@ -1324,9 +1319,7 @@ window.alert("Name is " + name + "; address is " + address);
13241319
13251320
You may call any function written in any Active Scripting language installed on the user's machine, including JScript and VBScript.
13261321
1327-
This method will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it.
1328-
1329-
1322+
This method will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it.
13301323
13311324
## Examples
13321325
The following code example executes the contents of a script in a Web page. The code example requires that you have a <xref:System.Windows.Forms.WebBrowser> in your application called `WebBrowser1`, and that you have loaded the following Web page.

0 commit comments

Comments
 (0)