The Scribble
sample shows how to develop a Windows
Forms MDI application using Visual
C# and the .NET
Framework classes. Scribble
is a small drawing
application that lets you draw
free-hand drawings using the mouse and save
the images in a file.
Building and
Running the Sample
To build
and run this sample
- Open the solution Scribble.sln.
- From the Build menu,
click Build Solution.
- From the Debug menu,
click Start Without Debugging.
When you run the sample,
you get a drawing surface and the following menu
items:
- File menu for input
and output operations.
- Edit menu to cut,
copy, and paste.
- Pen menu to select
the pen thickness.
- View menu to show or
hide the toolbar and the status bar.
- Window menu to
create, tile, or cascade windows.
- Help menu to display
the help topics and the About Scribble text box.
In addition to the menu
options, the user interface includes a toolbar with
buttons to duplicate the menu commands: New, Open,
Save, Print Preview,
Print, and Help.
Other Versions
of Scribble
Scribble is also available as
an MFC sample, as a Managed Extensions for C++ sample,
and as Visual Basic sample:
Classes and
Keywords
This sample
demonstrates the following classes:
System.Windows.Forms;
System.Collections.Arraylist; System.Drawing.Printing;
System.Runtime.Serialization;
System.Runtime.Serialization.Formatters.Binary
This sample demonstrates the
following keywords:
System.Windows.Forms.Form;
System.Windows.Forms.Form.MDIParent;
System.Windows.Forms.Form.MDIChildren;
System.Windows.Forms.ImageList;
System.Windows.Forms.HelpProvider;
System.Windows.Forms.ToolBar;
System.Windows.Forms.StatusBar;
System.Windows.Forms.OpenFileDialog;
System.Windows.Forms.SaveFileDialog;
System.Windows.Forms.Menu;
System.Windows.Forms.MenuItem; System.Windows.Forms.PrintPreviewDialog;
System.Windows.Forms.Help; System.Drawing.Printing;
System.Drawing.Printing.PrintDocument;
System.Drawing.Pen;
System.Drawing.Graphics;
System.Drawing.Graphics.DrawLine;
System.Collections.ArrayList;
System.Runtime.Serialization.Formatters.Binary
See Also
Visual
C# Samples | General
Samples