当前位置:网站首页>C knowledge point form summary 2

C knowledge point form summary 2

2022-07-01 11:45:00 dengfengling999

Window forms

characteristic :

* User interface objects ( visualization )

* Message cycle input

* Resource sharing

* Graphic output

* Event driven programs ( enter one user name 、 password )  

Form name with frm start

Lable Control is used to output text display information , Name with lbl start

Textbox: Enter... In the text box   Name with txt Opening words

Button: Button Name with btn start

PictureBox: Control for putting pictures   hold SizeMode Change it to StretchImage

Function realization :

MessageBox.Show(“”)   Prompt box

MessageBox.Show(“ Perform the login function ”)

MessageBox.Show(“ Perform the login function ”,“ Tips ”)

MessageBox.Show(“ Perform the login function ”,“ Tips ”,“MessageBoxButton.OKcancel”)

MessageBox.Show(“ Line login function ”,“ Tips ”,MessageBoxButton.OK,MessageBoxIcon.Warning);

Application.Exit(); Execute exit

Textbox Control password input is not displayed   hold PasswordChar write * Number

Press enter to log in : Set properties on the login page AcceptionButton Property is set to the login name

GroupBox Control is often used to logically combine a group of controls   Containers  Panel Control : Also used to partition

TabControl Control : Multiple tabs 、 Multi partition control   attribute TabPages You can add multiple members

RadioButton: Radio controls   use rbtn start

RadioButton attribute :

    1. Text: The text displayed on the control
    2. Checked: You can read or set this property to read or modify RadioButton Selected state

CheckBox: Multi select control  

  1. Properties and events :
      1. Text attribute
      2. Checked attribute
      3. CheckedChanged event

ComboBox Control : The user selects the options enumerated by the control  Items Edit item   Dropdown options

NumericUpDown Control :    Numeric selection control (NumericUpDown Control ) Is a control for displaying and entering values . The control provides a pair of up and down arrows , The user can click the up and down arrows to select the value , You can also type

ListBox Control : The list control is used to display a list , The user can select one or more . If the total number of options exceeds the number of items that can be displayed , The control will automatically add a scroll bar

Tablcontrol Control : Paging options

Menu bar control :MenuStrip  With mus Name at the beginning

The project name is marked with tsm start The items in the project are marked with tsmi Name at the beginning

Toolbar controls :ToolStrip  Item display picture and text change properties DisplayStyle, The toolbar : With tst start

Status bar control :StatusStrip, status bar : With tss Name the beginning

Context menus also become pop-up menus 、 Right-click menu 、 Shortcut menu ContextMenuStrip

Shortcut menus can be linked to forms Controls , Need to set up ContextMenuStrip attribute

The toolbar : With tst start

status bar : With tss Name the beginning

TreeView Tree control : Show node hierarchy

DateGridView Display data control , Display data in tabular form  

原网站

版权声明
本文为[dengfengling999]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202160043215837.html