|
The Form design,
introductory.cs
Create Visual C# .Net Forn - introductory.cs
Classes used in this
Form:
PictureBox, Button
- On the View menu ,
click Solution Explorer
- In Solution
Explorer
In Solution Explorer, right click the
work_VCnet, select Add on the shortcut menu to
open other shortcut menu, click Add New Item,
the Add New Item - work_VCnet dialog box
appears. |

|
- In the Add New
Item -work_VCnet dialog box:
- In the
Categories pane, select Local Project
Items
- In the Templates
pane, select Windows form . A message
appears - (a form for Windows Applications).
- In the Name
box, type introductory.cs
- Click
Open
|

|
- In the windows
Forms Designer appears the empty window Form
design
|
1. |
Picture files used by this form ...
|
|
- The folder
c:\work_VCnet\pic stored the bmp file
awork.bmp
|
2. |
The
introductory.cs design |
|
 |
The Properties of
the Form - introductory.cs... |
Name: FormBorderStyle Menu: Size: Start
Position: Text: Window
State: |
introductory none (none) 488,344 CenterScreen introductory
... Normal | | | |
3. |
From the Toolbox/Windows Form add these
controls .... Tree PictureBox controls, eight
Label controls and one Button
control. |
|
- Add the PictureBox
control - Picico, PictureBox
Properties:
Name: Image: Size
Mode: |
Picico System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_VCnet\pic\awork.bmp
- Add the Button
control - btnDone, Button
Properties:
Name: BackColor: Size: Text: |
btnDone Scrollbar 80,24 Done | | | | |
|
introductory.cs file, the codes after modification
...
The
text
Code
is red color, the codes added manuel |
|
using
System;
using
System.Drawing;
using
System.Collections;
using
System.ComponentModel;
using
System.Windows.Forms;
namespace
work_VCnet
{
///
<summary>
///
Summary description for introductory.
///
</summary>
public
class
introductory : System.Windows.Forms.Form
{
internal
System.Windows.Forms.Button btndone;
internal
System.Windows.Forms.PictureBox PictureBox1;
///
<summary>
///
Required designer variable.
///
</summary>
private
System.ComponentModel.Container components =
null;
public
introductory()
{
//
// Required for
Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any
constructor code after InitializeComponent call
//
}
///
<summary>
///
Clean up any resources being used.
///
</summary>
protected
override
void
Dispose( bool
disposing )
{
if(
disposing )
{
if(components
!= null)
{
components.Dispose();
}
}
base.Dispose(
disposing );
}
Windows Form Designer
generated code |
private
void
PictureBox1_Click(object
sender, System.EventArgs e)
{
this.Close();
}
private
void
btndone_Click(object
sender, System.EventArgs e)
{
this.Close();
}
}
}
| | |
|
|