In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the method of C# integrated development environment". In daily operation, I believe that many people have doubts about what the method of C# integrated development environment is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the method of C# integrated development environment?" Next, please follow the editor to study!
In the File menu of the C# integrated development environment, select New- > Project to open the New Project dialog box We select the project type as Visual C# Projects, select Windows Application in the template, enter the project name: HelloWindows in Name, and enter the saved path in Location. Once confirmed, the system automatically generates a program framework for you.
Now let's briefly familiarize ourselves with this C# integrated development environment.
Area An is our toolbox, including support for databases, components, form controls, etc., we can select and add to the form, if you can not find Toolbox, please select Toolbox in the menu View to open it.
Area B is our design workspace (including the design of the interface and code).
Zone C is equivalent to our workspace:Solution Explorer in VC6 can be regarded as the former FileView,ResourceView and ClassView. You must be very familiar with it. Have you seen the Form1.cs in Solution Explorer? This is the C # file corresponding to Form1. Double-click it to design the interface for Form1. Right-click Form1.cs and select View Code from the pop-up menu to view the corresponding code.
D area is the property window: similar to our VC6 resource editor in the property window, but more powerful, for on-screen components such as buttons, list box you can directly modify its properties: such as text, background color, and so on.
Our next task is to make about the dialog box and add a menu to open it.
Add a new Form: about dialog boxes
Select the menu Project- > Add Windows Form, select category as Local Project Items in the pop-up dialog box, select template as Windows Form, and enter the file name: AboutDlg.cs in Name to confirm. The new Form appears in the workspace, we change Text to "about" in the properties dialog box in D area, select BackColor to light blue, you can also try to change other properties.
Next, we open Toolbox, select Label in Win Forms, draw it in the form, and modify Text in the properties dialog box to "Welcome to VC knowledge Base!"
Http://www.vckbase.com", We add another Button to Win Forms and change Text to "confirm".
At this point, we have designed the interface of the dialog box, but how do we close the dialog box when the user presses the confirm button? We double-click the "confirm" button so that the system automatically adds the processing code for the button, in which we add the Close () function to close, as follows:
Protected void button1_Click (object sender, System.EventArgs e) {Close (); / / this is our added sentence}
Now that the dialog box is complete, what we need to do next is to add a menu to the main window. when we choose about in the menu, we will pop up "about dialog box". Let's continue.
Add a menu to the main window
Double-click Form1.cs in SolutionView to open Form1, select MainMenu in Toolbox- > Win Forms, and draw it in Form1. We can enter the menu bar at the word "TypeHere".
Double-click on the word, and the system will add the processing code for the menu bar for us, where we can add the code to open the "about dialog box":
Protected void button1_Click (object sender,System.EventArgs e) {AboutDlg dlg = new AboutDlg (); / / assign AboutDlg object dlg.ShowDialog (); / / display dialog box} at this point, the study on "what is the method of C# integrated development environment" is over, hoping to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.