Visual Studio Creates a C + + or C#windows program

Source: Internet
Author: User

Using the tools visual Studio, create a C + + or C#windows program that displays "Hello World" in the main window, where users can drag "Hello World" to move through the main window

Create a project first?

Select Windows Forms application in Visual C # to enter a name (you can leave the default),

Select a location, click the OK button?

The "Form1" window can be seen in the main window

Select the Label tab in the Toolbox to add the drag to the Form1 window

Select the lable control in "Form1" to set its property "Text" to the value "Hello World"

Double-click the control in "Form1" to add the following code in the Open Code view

Then return to form view Select the Label control in its property bar select the event button (that is, the Lightning icon), set the event

Finally click the Debug button (that is, the triangle button) on the toolbar to see the results

Is the final result, you can drag "Hello world" with the mouse to move to any location in the main form

Visual Studio Creates a C + + or C#windows program

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.