Skip to content

Fix git push error for protected CLA branch #3374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions docs/data-tools/create-a-sql-database-by-using-a-designer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ You can use Visual Studio to create and update a local database file in SQL Serv

## Prerequisites

To complete this walkthrough, you must have the optional **Data storage and processing** workload installed in Visual Studio. To install it, open **Visual Studio Installer** and choose **More** > **Modify** next to the version of Visual Studio you want to modify (if you have more than one version installed). On the **Workloads** tab, under **Web & Cloud**, choose **Data storage and processing**, and then click **Modify** to add the workload to Visual Studio.
To complete this walkthrough, you must have the optional **Data storage and processing** workload installed in Visual Studio. To install it, open **Visual Studio Installer** and choose **Modify** or **More** > **Modify** next to the version of Visual Studio you want to modify.

::: moniker range=">=vs-2019"

On the **Workloads** tab, under **Other Toolsets**, choose **Data storage and processing**, and then click **Modify** to add the workload to Visual Studio.

::: moniker-end

::: moniker range="=vs-2017"

On the **Workloads** tab, under **Web & Cloud**, choose **Data storage and processing**, and then click **Modify** to add the workload to Visual Studio.

::: moniker-end

## Create a project and a local database file

Expand Down Expand Up @@ -169,4 +181,4 @@ In this section, you'll create two tables, a primary key in each table, and a fe

## See also

- [Accessing data in Visual Studio](accessing-data-in-visual-studio.md)
- [Accessing data in Visual Studio](accessing-data-in-visual-studio.md)
11 changes: 7 additions & 4 deletions docs/ide/reference/rename.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ This refactoring applies to:

4. When you're happy with the change, choose the **Apply** button or press **Enter** and the changes will be committed.

> [!NOTE]
> If you use a name that already exists which would cause a conflict, the **Rename** box will warn you.
>
> ![Rename Conflict](media/rename-conflict-cs.png)
## Remarks

- If you use a name that already exists which would cause a conflict, the **Rename** box will warn you.

![Rename Conflict](media/rename-conflict-cs.png)

- Another way to rename a symbol is to change its name in the editor. Then, with the cursor in the symbol name, press **Ctrl**+**.** or just expand the light bulb icon menu that appears and choose **Rename \<old name> to \<new name>**.

## See also

Expand Down
49 changes: 35 additions & 14 deletions docs/ide/step-1-create-a-project-and-add-a-table-to-your-form.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Step 1: Create a project and add a table to your form"
ms.date: 11/04/2016
ms.date: 05/31/2019
ms.topic: conceptual
ms.prod: visual-studio-windows
ms.technology: vs-ide-general
Expand All @@ -21,33 +21,55 @@ The first step in creating a matching game is to create the project and add a ta

1. On the menu bar, choose **File** > **New** > **Project**.

1. Choose either **Visual C#** or **Visual Basic** on the left side of the **New Project** dialog box, and then choose **Windows Desktop**.

1. In the list of templates, choose the **Windows Forms App (.NET Framework)** template, name it *MatchingGame*, and then choose the **OK** button.

A form that's named *Form1.cs* or *Form1.vb* appears, depending on the programming language that you chose.

> [!NOTE]
> If you don't see the **Windows Forms App (.NET Framework)** template, use the Visual Studio Installer to install the **.NET desktop development** workload.<br/><br/>![.NET desktop development workload in the Visual Studio Installer](../ide/media/dot-net-desktop-dev-workload.png)<br/><br/> For more information, see the [Install Visual Studio](../install/install-visual-studio.md) page.

::: moniker-end

::: moniker range="vs-2019"

1. On the start window, choose **Create a new project**.

1. In the search box, type "WPF", choose **WPF App (.NET Framework)**, and then choose **Next**.
![View the 'Create a new project' window](../get-started/media/vs-2019/create-new-project-dark-theme.png)

(If you don't see the **WPF App (.NET Framework)** template, use the Visual Studio Installer to install the **.NET desktop development** workload.)
1. On the **Create a new project** window, enter or type *Windows Forms* in the search box.

1. Give the project a name, **MatchingGame**, and choose **Create**
1. Choose the **Windows Forms App (.NET Framework)** template, and then choose **Next**.

::: moniker-end
![Choose the Visual Basic template for the Windows Forms App (.NET Framework)](../get-started/visual-basic/media/vs-2019/vb-create-new-project-search-winforms-filtered.png)

> [!NOTE]
> If you do not see the **Windows Forms App (.NET Framework)** template, you can install it from the **Create a new project** window. In the **Not finding what you're looking for?** message, choose the **Install more tools and features** link.
>
> ![The 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window](../get-started/media/vs-2019/not-finding-what-looking-for.png)
>
> Next, in the Visual Studio Installer, choose the Choose the **.NET desktop development** workload.
>
> ![.NET Core workload in the Visual Studio Installer](../ide/media/install-dot-net-desktop-env.png)
>
> After that, choose the **Modify** button in the Visual Studio Installer. You might be prompted to save your work; if so, do so. Next, choose **Continue** to install the workload.

1. In the **Configure your new project** window, type or enter *MatchingGame* in the **Project name** box. Then, choose **Create**.

2. If you're not using Visual Studio Express, you need to select a programming language first. From the **Installed Templates** list, choose either **Visual C#** or **Visual Basic**.
::: moniker-end

3. In the list of project templates, choose **Windows Forms Application**, name the project **MatchingGame**, and then choose the **OK** button.
## To set properties for a form

4. In the **Properties** window, set the following form properties.
1. In the **Properties** window, set the following form properties.

1. Change the form's **Text** property from **Form1** to **Matching Game**. This text appears at the top of the game window.

2. Set the size of the form to 550 pixels wide by 550 tall. You can do this either by setting the **Size** property to **550, 550**, or by dragging the corner of the form until you see the correct size in the lower-right corner of the integrated development environment (IDE).

5. Display the toolbox by choosing the **Toolbox** tab on the left side of the IDE.
2. Display the toolbox by choosing the **Toolbox** tab on the left side of the IDE.

6. Drag a <xref:System.Windows.Forms.TableLayoutPanel> control from the **Containers** category in the toolbox, and then set the following properties for it.
3. Drag a <xref:System.Windows.Forms.TableLayoutPanel> control from the **Containers** category in the toolbox, and then set the following properties for it.

1. Set the **BackColor** property to **CornflowerBlue**. To do this, open the **BackColor** dialog box by choosing the drop-down arrow next to the **BackColor** property in the **Properties** window. Then, choose the **Web** tab in the **BackColor** dialog box to view a list of available color names.

Expand All @@ -66,7 +88,7 @@ The first step in creating a matching game is to create the project and add a ta

Your TableLayoutPanel should now be a 4x4 grid, with sixteen equally sized square cells. These rows and columns are where the icon images will appear later.

7. Be certain that the TableLayoutPanel is selected in the form editor. To verify this, you should see **tableLayoutPanel1** at the top of the **Properties** window. If it is not selected, choose the TableLayoutPanel on the form, or choose it in the dropdown control at the top of the **Properties** window.
4. Be certain that the TableLayoutPanel is selected in the form editor. To verify this, you should see **tableLayoutPanel1** at the top of the **Properties** window. If it is not selected, choose the TableLayoutPanel on the form, or choose it in the dropdown control at the top of the **Properties** window.

While the TableLayoutPanel is selected, open the toolbox and add a <xref:System.Windows.Forms.Label> control (located in the **Common Controls** category) to the upper-left cell of the TableLayoutPanel. The label control should now be selected in the IDE. Set the following properties for it.

Expand All @@ -89,15 +111,14 @@ The first step in creating a matching game is to create the project and add a ta
> [!NOTE]
> The Webdings font is a font of icons that ships with the Windows operating system. In your matching game, the player needs to match pairs of icons, so you use this font to display the icons to match. Instead of putting **c** in the **Text** property, try entering different letters to see what icons are displayed. An exclamation point is a spider, an uppercase N is an eye, and a comma is a chili pepper.

8. Choose your Label control and copy it to the next cell in the TableLayoutPanel. (Choose the **Ctrl**+**C** keys, or on the menu bar, choose **Edit** > **Copy**.) Then paste it. (Choose the **Ctrl**+**V** keys, or on the menu bar, choose **Edit** > **Paste**.) A copy of the first Label appears in the second cell of the TableLayoutPanel. Paste it again, and another Label appears in the third cell. Keep pasting Label controls until all of the cells are filled.
5. Choose your Label control and copy it to the next cell in the TableLayoutPanel. (Choose the **Ctrl**+**C** keys, or on the menu bar, choose **Edit** > **Copy**.) Then paste it. (Choose the **Ctrl**+**V** keys, or on the menu bar, choose **Edit** > **Paste**.) A copy of the first Label appears in the second cell of the TableLayoutPanel. Paste it again, and another Label appears in the third cell. Keep pasting Label controls until all of the cells are filled.

> [!NOTE]
> If you paste too many times, the IDE adds a new row to the TableLayoutPanel so that it has a place to add your new Label control. You can undo it. To remove the new cell, choose the **Ctrl**+**Z** keys, or on the menu bar, choose **Edit** > **Undo**.

Now your form is laid out. It should look like the following picture.

![Initial matching game form](../ide/media/express_tut4step1.png)
Initial matching game form
![Initial matching game form](../ide/media/express_tut4step1.png)<br/> Initial matching game form

## To continue or review

Expand Down
11 changes: 7 additions & 4 deletions docs/ide/step-1-create-a-project-and-add-labels-to-your-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ As the first steps in developing this quiz, you create the project, and you add

1. On the menu bar, choose **File** > **New** > **Project**.

1. In the **Installed Templates** list, choose either **C#** or **Visual Basic**.
1. Choose either **Visual C#** or **Visual Basic** on the left side of the **New Project** dialog box, and then choose **Windows Desktop**.

1. In the list of templates, choose the **Windows Forms Application** template, name it **MathQuiz**, and then choose the **OK** button.
1. In the list of templates, choose the **Windows Forms App (.NET Framework)** template, name it *MathQuiz*, and then choose the **OK** button.

A form that's named *Form1.cs* or *Form1.vb* appears, depending on the programming language that you chose.
A form that's named *Form1.cs* or *Form1.vb* appears, depending on the programming language that you chose.

> [!NOTE]
> If you don't see the **Windows Forms App (.NET Framework)** template, use the Visual Studio Installer to install the **.NET desktop development** workload.<br/><br/>![.NET desktop development workload in the Visual Studio Installer](../ide/media/dot-net-desktop-dev-workload.png)<br/><br/> For more information, see the [Install Visual Studio](../install/install-visual-studio.md) page.

::: moniker-end

Expand Down Expand Up @@ -59,7 +62,7 @@ As the first steps in developing this quiz, you create the project, and you add

::: moniker-end

## To create set properties for a form
## To set properties for a form

1. In Visual Studio, choose the form (either *Form1.cs* or *Form1.vb*, depending on the programming language), and then change its **Text** property to **Math Quiz**.

Expand Down
23 changes: 11 additions & 12 deletions docs/ide/step-1-create-a-windows-forms-application-project.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Step 1: Create a Windows Forms Application project"
ms.date: 03/23/2019
ms.date: 06/01/2019
ms.prod: visual-studio-windows
ms.technology: vs-ide-general
ms.topic: conceptual
Expand All @@ -22,14 +22,13 @@ When you create a picture viewer, the first step is to create a Windows Forms Ap

## Open Visual Studio 2017

1. On the menu bar, choose **File** > **New** > **Project**. The dialog box should look like this.
1. On the menu bar, choose **File** > **New** > **Project**. The dialog box should look similar to the following screenshot.

![New project dialog](../ide/media/newprojectdialogcallouts.png)<br/>
***New project** dialog box*
![New project dialog](../ide/media/newprojectdialogcallouts.png)<br/>***New project*** *dialog box*

2. Choose either **Visual C#** or **Visual Basic** on the left side of the **New Project** dialog box.
2. Choose either **Visual C#** or **Visual Basic** on the left side of the **New Project** dialog box, and then choose **Windows Desktop**.

3. In the templates list, choose **Windows Forms App (.NET Framework)**. Name the new form **PictureViewer**, and then choose the **OK** button.
3. In the templates list, choose **Windows Forms App (.NET Framework)**. Name the new form *PictureViewer*, and then choose the **OK** button.

>[!NOTE]
>If you don't see the **Windows Forms App (.NET Framework)** template, use the Visual Studio Installer to install the **.NET desktop development** workload.<br/><br/>![.NET desktop development workload in the Visual Studio Installer](../ide/media/dot-net-desktop-dev-workload.png)<br/><br/> For more information, see the [Install Visual Studio](../install/install-visual-studio.md) page.
Expand All @@ -44,7 +43,7 @@ When you create a picture viewer, the first step is to create a Windows Forms Ap

![View the 'Create a new project' window](../get-started/media/vs-2019/create-new-project-dark-theme.png)

1. On the **Create a new project** window, enter or type *Windows Forms* in the search box. Next, choose **Visual Basic** from the Language list, and then choose **Windows** from the Platform list.
1. On the **Create a new project** window, enter or type *Windows Forms* in the search box. Next, choose **Visual Basic** from the Language list, and then choose **Windows** from the Platform list.

After you apply the language and platform filters, choose the **Windows Forms App (.NET Framework)** template, and then choose **Next**.

Expand All @@ -53,13 +52,13 @@ When you create a picture viewer, the first step is to create a Windows Forms Ap
> [!NOTE]
> If you do not see the **Windows Forms App (.NET Framework)** template, you can install it from the **Create a new project** window. In the **Not finding what you're looking for?** message, choose the **Install more tools and features** link.
>
> ![The 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window](../get-started/media/vs-2019/not-finding-what-looking-for.png)
>
> ![The 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window](../get-started/media/vs-2019/not-finding-what-looking-for.png)
>
> Next, in the Visual Studio Installer, choose the Choose the **.NET desktop development** workload.
>
>
> ![.NET Core workload in the Visual Studio Installer](../ide/media/install-dot-net-desktop-env.png)
>
> After that, choose the **Modify** button in the Visual Studio Installer. You might be prompted to save your work; if so, do so. Next, choose **Continue** to install the workload.
> After that, choose the **Modify** button in the Visual Studio Installer. You might be prompted to save your work; if so, do so. Next, choose **Continue** to install the workload.

1. In the **Configure your new project** window, type or enter *PictureViewer* in the **Project name** box. Then, choose **Create**.

Expand Down Expand Up @@ -109,4 +108,4 @@ Visual Studio creates a solution for your program. A solution acts as a containe

## See also

- [Creating a new Windows Form](/dotnet/framework/winforms/creating-a-new-windows-form/)
- [Creating a new Windows Form](/dotnet/framework/winforms/creating-a-new-windows-form/)
9 changes: 3 additions & 6 deletions docs/ide/step-5-add-controls-to-your-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ In this step, you add controls, such as a <xref:System.Windows.Forms.PictureBox>

4. Choose the new **PictureBox** control to select it, and then choose the black triangle on the new PictureBox control to display its task list, as shown in the following picture.

![PictureBox tasks](../ide/media/express_pictureboxtasks.png)
**PictureBox** tasks
![PictureBox tasks](../ide/media/express_pictureboxtasks.png)<br/>***PictureBox*** *tasks*

> [!NOTE]
> If you accidentally add the wrong type of control to your TableLayoutPanel, you can delete it. Right-click the control, and then choose **Delete** on its context menu. You can also remove controls from the form by using the menu bar. On the menu bar, choose **Edit** > **Undo**, or **Edit** > **Delete**.
Expand All @@ -39,8 +38,7 @@ In this step, you add controls, such as a <xref:System.Windows.Forms.PictureBox>

7. Choose the **TableLayoutPanel** on the form and then add a CheckBox control to the form. Double-click the **CheckBox** item in the **Toolbox** to add a new CheckBox control to the next free cell in your table. Because a PictureBox takes up the first two cells in the TableLayoutPanel, the CheckBox control is added to the lower-left cell. Choose the **Text** property and type in the word **Stretch**, as shown in the following picture.

![TextBox control with Stretch property](../ide/media/express_pictureviewercheckbox.png)
**TextBox** control with **Stretch** property
![TextBox control with Stretch property](../ide/media/express_pictureviewercheckbox.png)<br/>***TextBox*** *control with* ***Stretch*** *property*

8. Choose the **TableLayoutPanel** on the form, and then go to the **Containers** group in the **Toolbox** (where you got your TableLayoutPanel control) and double-click the **FlowLayoutPanel** item to add a new control to the last cell in the PictureBox (bottom right). Then dock the FlowLayoutPanel in the TableLayoutPanel (either by choosing **Dock in parent container** on the FlowLayoutPanel's black triangle task list, or by setting the FlowLayoutPanel's **Dock** property to **Fill**).

Expand All @@ -65,8 +63,7 @@ In this step, you add controls, such as a <xref:System.Windows.Forms.PictureBox>

5. Choose the **Close** button to select it. Hold down the **Ctrl** key and choose the other three buttons, so that they are all selected. While all the buttons are selected, go to the **Properties** window and scroll up to the **AutoSize** property. This property tells the button to automatically resize itself to fit all of its text. Set it to **true**. Your buttons should now be sized properly and be in the right order. (As long as all four buttons are selected, you can change all four **AutoSize** properties at the same time.) The following picture shows the four buttons.

![Picture Viewer with four buttons](../ide/media/express_autosize.png)
**Picture Viewer** with four buttons
![Picture Viewer with four buttons](../ide/media/express_autosize.png)<br/>***Picture Viewer*** *with four buttons*

6. Now run your program again to see your newly laid out form. Choosing the buttons and the check box doesn't do anything yet, but it will work soon.

Expand Down
Loading