|
The
Form design, introductory.cs
Create Visual C# 2010 Forn -
introductory.cs
Classes used in this Form:
PictureBox, Button
Create the Form
introductory.cs
Add New Item -
introductory.cs Form to work_VCNet10
Project
- On the Projet
menu , click Add New Item ...,
Add New Item - work_VCNet10 dialog box appears, Select
Windows form Icon,
in the Name box type
introductory.cs and then click
Add.
|
 |
|
Note:
In the Windows Forms Designer appears the
design form created and in the Properties
Windows displays the corresponding properties
and
The design Form introductory.cs created, appears the empty window Form
design |
|
The codes file, created
... |
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
work_VCNet10
{
public
partial
class
introductory :
Form
{
public
introductory()
{
InitializeComponent();
}
private
void introductory_Load(object
sender,
EventArgs
e)
{
}
}
}
|
|
|
|
|
1. |
Picture files used by this form ...
|
|
- The folder
c:\work_VCNet10\work_VCNet10\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_VCNet10\work_VCNet10\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
...
|
|
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using System.Data;
using
System.Drawing;
using System.Linq;
using System.Text;
using
System.Windows.Forms;
namespace
work_VCnet10
{
public
partial
class
introductory :
Form
{
public
introductory()
{
InitializeComponent();
}
private
void
PictureBox1_Click(object
sender,
EventArgs
e)
{
this.Close();
}
private
void
btndone_Click(object
sender,
EventArgs
e)
{
this.Close();
}
}
}
| | |
|
|