Developing a database application system using C #

Source: Internet
Author: User

Chapter One: The first knowledge of Windows programs


1: Create a Windows program

2. Note the point:

/*01. A solution can contain multiple projects,

* multiple forms can be included under an item

* 02. How do I set a form under a project as the startup form???

* Parse: By changing The last line of code in the Program.csmain method setting

* 03. control's Name property is equivalent to a hidden value , be sure to change

* The text property that really displays content on the form

Exam

* 04. If there are multiple projects under a solution, how do I set a project as a startup item??

* Resolution: You can right click on the item → Set as Startup item

* 05. How to save the project in the computer room, or how to open it after saving ???

* Resolution: You can save the solution to the specified project, the next time

* Open the sln file directly

How can I change the size of a form after it has been run?

* Resolution: The following settings:

*01. Disable the Maximize button

* 02. Set FormBorderStyle property is any one of the Fixed the properties that begin with are OK

MessageBox

parameter one: prompt information

Parameter two: Title text

Parameter three: Button settings

Parameter four: Icon setting

MessageBox.Show ("Congratulations, the jackpot is 500, will you please eat?" "," The Warm Hint ", messageboxbuttons.yesno,messageboxicon.warning);

        . form Pass -through value

parsing: passing the login user name from the login form to the main form, you can define a public variable in the main form, and then Login write the following code in the form's Login button event:

Main Frm=new main ();

Frm.name=txtname.text;

frm. Show ();

The Label control is then assigned a value in the load event of Main .

Real Exit Procedure

In the formclosing event of the form , write application.exit ();

any control in the toolbox is a class, and once you drag him onto The form , he becomes an object, and you can go through the F4 shortcut keys in the Properties window, assign values to each of her properties.

Developing a database application system using C #

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.