"2017-05-02" WinForm pop-up warning box for redaction operations, Notepad Authoring, dialog box controls, and output input streams

Source: Internet
Author: User

First, WinForm pop-up warning box whether to make a pruning operation

The first parameter is what the popup form displays, the second parameter is the caption, and the third parameter is the pop-up window containing the OK and Cancel buttons.

An enumeration class is returned to receive a bit.

Again to judge, if the point is to determine the button, and then the next step of adding and removing operations.

Second, the production of Notepad

1. menu Toolbar menustrip-Insert Standard Item

2. TextBox-Display Section

Small arrow MultiLine Select multiple rows

The Dock property is full.

3. function

-Revoke

-Cut

-Paste

-Copy

-delete

-Select All

-Time

-Find

Make a single form click Open

Pass the main window to the Search window

Expansion: Three types of window opening

1, objects.   Show (); Open freely

2, objects. Owner=this

Object. Show ();

Opens the window above the parent window, which can manipulate the parent window while the child window is open.

3, objects.    ShowDialog (); Open in the form of a pop-up window, and the parent window cannot be manipulated without closing the subwindow.

Expand: How to invoke the control of the main window in a child window

Passes the main window through the constructor to the child window, and then changes the control's access modifier's private to public in the generated code of the main window control.

You can call the control of the parent window.

-Wrap Line

Iii. dialog box controls and input and output streams

1, ColorDialog-color selection

2. FontDialog-Font selection

3. OpenFileDialog-Open File dialog box

Have a file path, how do I open this file?
Using Stream IO

Using System.IO;

4. SaveFileDialog-Save dialog box

First because of the namespace using System.IO;

StreamReader Read stream

Streamwrite output stream

---restore content ends---

"2017-05-02" WinForm pop-up warning box for redaction operations, Notepad Authoring, dialog box controls, and output input streams

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.