0505.Net Basic class 14th day (WinForm basis)

Source: Internet
Author: User

1, WinForm application is a kind of intelligent client technology, we can use the WinForm application to help us get information or transfer information.

2, property name: In the background to get the foreground control object, you need to use the Name property. Visible: Indicates whether a control is visible. Enabled: Indicates whether a control is available.

3. Event: Something happened. Registering an event: double-clicking the control registers the event that the control is selected by default. Trigger event:

4. The form object created in the main function, which we call the main form of this form application. It also means that when you close the main form, the entire application is closed.

5. TextBox Control WordWrap: Indicates whether the text box wraps. PasswordChar: Let the text box display a single character scollbars: whether scroll bar event is displayed: TextChanged triggers this event when the contents of the text box change.

6, the Marquee practice ABCDE Bcdea string str= "ABCDE"; Str=str. Substring (1) +str. Substring (0,1);


7. The Timer does a specified thing within the specified time interval.

8, simple to remember the application 1), in the program load, cancel text box wrap, and let two buttons and text box Hide 2), click to log in, determine whether the login Success 3), the automatic line wrapping function 4), save the text to a specified directory.

9, single and multiple select checked: Indicates whether the control is selected.

By default, all radio buttons in a form allow only one selection and can be grouped using GroupBox.

10, the MDI Form Design 1, first determine a parent form. Set IsMdiContainer to True. 2. Create a subform, and set their parent form.

01MD5 encryption

1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.Linq;4 usingSystem.Security.Cryptography;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 8 namespace_01MD5 Encryption9 {Ten     class Program One     { A         Static voidMain (string[] args) -         { -             //Woaini Woaini the             //202cb962ac59075b964b07152d234b70 -            //string s = GetMD5 ("123"); -             //202cb962ac59075b964b07152d234b70 -             //202cb962ac59075b964b07152d234b70 +             //202cb962ac5975b964b7152d234b70 -             //3244185981728979115075721453575112 +             //Console.WriteLine (s); A             //Console.readkey (); at             //double n = 123.456; -             //Console.WriteLine (n.tostring ("C")); -             //Console.readkey (); -         } -  -          Public Static stringGetMD5 (stringstr) in         { -             //Create a MD5 object toMD5 MD5 =MD5. Create (); +             //Start Encryption -             //need to convert character to byte array the             byte[] buffer = encoding.getencoding ("GBK"). GetBytes (str); *             //returns a well-encrypted byte array $             byte[] Md5buffer =md5.computehash (buffer);Panax Notoginseng  -             //converts a byte array into a string the             //byte array---string +             //parses each element in a byte array into a string according to the specified encoding format A             //directly set the array to ToString (); the             //each element in a byte array is tostring () +           //return encoding.getencoding ("GBK"). GetString (md5buffer); -  $             //189 273 345 I love you . $             //189 273 345 -             stringStrnew =""; -              for(inti =0; i < md5buffer.length; i++) the             { -Strnew + = Md5buffer[i]. ToString ("X2");Wuyi             } the             returnstrnew; -         } Wu     } -}
View Code

0505.Net Basic class 14th day (WinForm basis)

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.