Skip to content

Commit 10817f8

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents c414c9c + 616478a commit 10817f8

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

docs/get-started/csharp/tutorial-windows-forms-match-game-icons.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ To learn more about lists, see <xref:System.Collections.Generic.List%601>. To se
7777
Each time you run the program, it assigns the icons randomly to the Label controls on your form by using an `AssignIconsToSquares()` method.
7878
This code uses the keyword `foreach` in C# or `For Each` in Visual Basic.
7979

80-
1. Add the `AssignIconsToSquares()` method.
80+
1. Add the `AssignIconsToSquares()` method to `Form1.cs` or `Form1.vb`.
8181

8282
### [C#](#tab/csharp)
8383
:::code language="csharp" source="../../snippets/csharp/VS_Snippets_VBCSharp/vbexpresstutorial4step2_3_4/cs/form1.cs" id="Snippet2":::
@@ -108,13 +108,13 @@ This code uses the keyword `foreach` in C# or `For Each` in Visual Basic.
108108
The line is commented out here so you can verify the rest of the code before proceeding.
109109
- The last line in the `if` statement removes the icon that has been added to the form from the list.
110110

111-
1. Add a call to the `AssignIconsToSquares()` method to the **Form1** *constructor*.
111+
1. Add a call to the `AssignIconsToSquares()` method to the **Form1** *constructor* in `Form1.cs`.
112112
This method fills the game board with icons.
113113
Constructors are called when you create an object.
114114

115115
:::code language="csharp" source="../../snippets/csharp/VS_Snippets_VBCSharp/vbexpresstutorial4step2_3_4/cs/form1.cs" id="Snippet13":::
116116

117-
For Visual Basic, add the `AssignIconsToSquares()` method call to the `Form1_Load` method.
117+
For Visual Basic, add the `AssignIconsToSquares()` method call to the `Form1_Load` method in `Form1.vb`.
118118

119119
```vb
120120
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -135,7 +135,7 @@ This code uses the keyword `foreach` in C# or `For Each` in Visual Basic.
135135

136136
The icons are visible now because you haven't hidden them. To hide them from the player, you can set each label's **ForeColor** property to the same color as its **BackColor** property.
137137

138-
1. Stop the program. Remove the comment marks for the commented line of code inside the loop.
138+
1. Stop the program. Remove the comment marks for the commented line of code inside the loop in the `AssignIconsToSquares()` method.
139139

140140
### [C#](#tab/csharp)
141141
:::code language="csharp" source="../../snippets/csharp/VS_Snippets_VBCSharp/vbexpresstutorial4step2_3_4/cs/form1.cs" id="Snippet15":::
@@ -168,7 +168,7 @@ To get your game to work this way, add a <xref:System.Windows.Forms.Control.Clic
168168

169169
![Screenshot shows the Properties window showing Click event.](../media/tutorial-windows-forms-match-game-icons/click-event.png)
170170

171-
1. Select the **Enter** key. The IDE adds a `Click` event handler called **label1 _Click()** to the code.
171+
1. Select the **Enter** key. The IDE adds a `Click` event handler called **label1 _Click()** to the code in **Form1.cs** or **Form1.vb**.
172172
Because you selected all the labels, the handler is hooked to each of the labels.
173173

174174
1. Fill in the rest of the code.

docs/get-started/csharp/tutorial-windows-forms-match-game-labels.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.author: meghaanand
99
manager: mijacobs
1010
ms.subservice: general-ide
1111
ms.topic: tutorial
12-
ms.date: 03/16/2023
12+
ms.date: 10/18/2024
1313
ms.custom: vs-acquisition
1414
---
1515
# Tutorial: Add reference variables and a timer control to your matching game WinForms app
@@ -38,19 +38,21 @@ Complete those tutorials first.
3838
In this section, you'll add two *reference variables* to your code.
3939
They keep track of, or refer to Label objects.
4040

41-
1. Add label references to your form by using the following code.
41+
1. Add label references to your form by using the following code in `Form1.cs` or `Form1.vb`.
4242

4343
### [C#](#tab/csharp)
4444
:::code language="csharp" source="../../snippets/csharp/VS_Snippets_VBCSharp/vbexpresstutorial4step5/cs/form1.cs" id="Snippet5":::
4545

4646
### [VB](#tab/vb)
4747
:::code language="vb" source="../../snippets/visualbasic/VS_Snippets_VBCSharp/vbexpresstutorial4step5/vb/form1.vb" id="Snippet5":::
4848
---
49+
50+
If you're using C#, put the code after the opening curly brace and just after the class declaration (`public partial class Form1 : Form`). If you're using Visual Basic, put the code right after the class declaration (`Public Class Form1`).
4951

5052
These statements don't cause Label controls to appear on the form because there's no `new` keyword.
5153
When the program starts, both `firstClicked` and `secondClicked` are set to `null` for C# or `Nothing` for Visual Basic.
5254

53-
2. Modify your <xref:System.Windows.Forms.Control.Click> event handler to use the new `firstClicked` reference variable.
55+
2. Modify your <xref:System.Windows.Forms.Control.Click> event handler in `Form1.cs` or `Form1.vb` to use the new `firstClicked` reference variable.
5456
Remove the last statement in the `label1_Click()` event handler method (`clickedLabel.ForeColor = Color.Black;`) and replace it with the `if` statement as follows.
5557

5658
### [C#](#tab/csharp)
@@ -94,7 +96,7 @@ If the icons don't match, it hides the two icons again after a short period of t
9496
Your program calls the <xref:System.Windows.Forms.Timer.Start> method to start the timer after the player chooses the second label.
9597

9698
4. Choose the timer control icon and then press **Enter**, or double-click the timer.
97-
The IDE adds an empty Tick event handler.
99+
The IDE adds an empty Tick event handler to `Form1.cs` or `Form1.vb`.
98100
Replace the code with the following code.
99101

100102
### [C#](#tab/csharp)
@@ -109,7 +111,7 @@ If the icons don't match, it hides the two icons again after a short period of t
109111
- It uses two reference variables, `firstClicked` and `secondClicked`, to make the icons of the two labels that the player chose invisible again.
110112
- It resets the `firstClicked` and `secondClicked` reference variables to `null` in C# and `Nothing` in Visual Basic.
111113

112-
5. Go to the code editor and add code to the top and bottom of the `label1_Click()` event handler method.
114+
5. Go to the code editor and add code to the top and bottom of the `label1_Click()` event handler method in `Form1.cs` or `Form1.vb`.
113115
This code will check if the timer is enabled, set the `secondClicked` reference variable, and start the timer.
114116
The `label1_Click()` event handler method now looks as follows:
115117

docs/get-started/csharp/tutorial-wpf.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
title: "Hello World app with WPF in C#"
33
description: Create a simple Windows Desktop .NET application in C# with Visual Studio by using the Windows Presentation Foundation (WPF) UI framework.
44
ms.custom: vs-acquisition
5-
ms.date: 11/17/2023
6-
5+
ms.date: 10/18/2024
76
ms.subservice: general-ide
87
ms.topic: tutorial
98
dev_langs:
@@ -160,7 +159,7 @@ We add three types of controls to this application: a <xref:System.Windows.Contr
160159

161160
### Customize the text in the text block
162161

163-
1. In the XAML view, locate the markup for **TextBlock** and change the **Text** attribute from `TextBox` to `Select a message option and then choose the Display button.`
162+
1. In the XAML view, locate the markup for **TextBlock** and change the **Text** attribute from `TextBlock` to `Select a message option and then choose the Display button.`
164163

165164
The XAML markup should look something like the following example:
166165

docs/ide/editor-sticky-scroll.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About the Editor Sticky Scroll feature
33
description: Use the Sticky Scroll feature in Visual Studio to quickly view code scopes at the top of the editor, which helps you stay in the right context while you code.
4-
ms.date: 06/18/2024
4+
ms.date: 10/18/2024
55
ms.topic: overview
66
author: anandmeg
77
ms.author: meghaanand
405 KB
Loading

docs/ide/use-solution-explorer.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Learn about Solution Explorer
33
description: Use Solution Explorer in Visual Studio and review the context menu options to manage the projects and files in a solution.
4-
ms.date: 10/04/2024
4+
ms.date: 10/18/2024
55
ms.topic: conceptual
66
helpviewer_keywords:
77
- solution explorer [Visual Studio]
@@ -39,6 +39,8 @@ The following table is a text-equivalent of the annotated screenshot, but with a
3939
|**Program** node | View, edit, and manage your program or application (app) |
4040
|[**Git Changes** tab](../version-control/git-with-visual-studio.md) | Use Git & GitHub within Visual Studio to collaborate on projects with your team |
4141

42+
To view more of the application images and icons that appear in Visual Studio, download the [Visual Studio Image Library](https://www.microsoft.com/download/details.aspx?id=35825).
43+
4244
### Solution Explorer toolbar
4345

4446
To continue, let's take a closer look at the toolbar in Solution Explorer.
@@ -168,3 +170,4 @@ You can use the **New Solution Explorer View** to add a new scoped Solution Expl
168170
- [What are solutions and projects in Visual Studio?](solutions-and-projects-in-visual-studio.md)
169171
- [What is the .NET Project Designer?](reference/project-properties-reference.md)
170172
- [Customize window layouts and personalize tabs in Visual Studio](customizing-window-layouts-in-visual-studio.md)
173+
- [Visual Studio Image Library](https://www.microsoft.com/download/details.aspx?id=35825)

0 commit comments

Comments
 (0)