Textbox:
Property:
Text: Literal
SelectedText: Gets or sets the selected text
CanUndo: Is it possible to revoke
Method:
Undo: Undo
Clearundo: emptying the undo buffer
Cut: Cut
Copy: Copying
Paste: Pasting
SelectAll: Select All
dialog box: ShowDialog (); Displays a dialog box that returns an enumeration type of DialogResult
Colordialog:color property, used to get the color
Folderbrowserdialog:selectedpath Selected Path
The Fontdialog:font property returns a font type value that stores the settings for the font
Openfiledialog:filename Gets or sets the file path that contains the filename
Filenames is an array of file path strings
Filter: File filter format is hint text one |*. suffix | hint text two |*. suffix | hint text three |*. suffix
Savefiledialog1:filename Gets or sets the file path that contains the filename
Filenames is an array of file path strings
Filter: File filter format is hint text one |*. suffix | hint text two |*. suffix | hint text three |*. suffix
Stream: Input stream: string filename = openfiledialog1.filename; //Read through the stream for file reading StreamReader sr = new StreamReader ( filename); TextBox1.Text = Sr. ReadToEnd (); Sr. Close (); Output stream: string filename = savefiledialog1.filename; //write stream, you can create a file on your hard disk, and write information to the file StreamWriter sw = new StreamWriter (filename); SW. Write (This.textBox1.Text); SW. Close (); this: The current object that represents the class in which it resides
Print: Print Dialog: PrintDialog Page setup: PageSetupDialog Both dialogs need to be set PrintDocument to specify the print object PrintDocument: The object must be printed, a piece of artboard, Used to relay between the printer and the printed content, the printer prints a printdoment printdocument1_printpage: event, which is triggered before each page is printed, and is used to give PrintDocument the specified print content to the page of the printed object through the artboard: System.Drawing.Font f = new System.Drawing.Font ("Arial", 12); E.graphics.drawstring (textbox1.text,f,system.drawing.brushes.aqua,5,5); Last Print: Print dialog box, if the print dialog returns to confirm printing, execute printdocument.print ();
WinForm Notepad Programming section