|
The
Form design, Biography.cs
Create Visual C# 2010 Forn -
biography.cs
Classes used in this Form: Timer,
PictureBox, Label,
Button
Create the Form
Biography.cs
Add New Item -
Biography.cs Form to App_CAKJV10
Project
- On the Projet
menu , click Add New Item ...,
Add New Item - App_CAKJV10 dialog box appears, Select
Windows form Icon,
in the Name box type
Biography.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 Biography.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
App_CAKJV10
{
public
partial
class
Biography1 :
Form
{
public
Biography()
{
InitializeComponent();
}
private
void Biography_Load(object
sender,
EventArgs
e)
{
}
}
}
|
|
|
|
|
1. |
Add picture file ...
|
|
- The bmp files
butterfly1.bmp and
butterfly2.bmp of the folder
c:\App_CAKJV10/App_CAKJV10/Pic
- On the
Projet menu , click Add
Existing Item ..., Add Existing
Item - App_CAKJV10 dialog box
appears, select the files butterfly2.bmp
of the folder
c:\App_CAKJV10/App_CAKJV10/Pic, and then click
Open.
|
2. |
The
Biography.cs
design |
|
 |
The Properties of
the Form -
Biography.cs... |
Name: Icon: Maximize: Menu: Size: Start
Position: Text: Window
State: |
Biography Icon False (none) 488,216 CenterScreen Biography
... Normal | | | |
3. |
From the Toolbox/Windows Form add these
controls .... Tree PictureBox controls, eight
Label controls and
one Button control. |
|
- Add
the PictureBox
control - PictureBox1,
PictureBox
Properties:
Name: Image: Size
Mode: |
PictureBox1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App_CAKJV10/App_CAKJV10/Pic\butterfly1.bmp
- Add
the PictureBox
control - PictureBox2
Properties:
Name: Image: Size
Mode: |
PictureBox2 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App_CAKJV10/App_CAKJV10/Pic\butterfly1.bmp
- Add
the PictureBox
control - PictureBox3,
PictureBox Properties:
Name: Image: Size
Mode: |
PictureBox3 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App_CAKJV10/App_CAKJV10/Pic\butterfly2.bmp
- Add
the Label
control
- Label1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label1 Microsoft Sans Serif,
8.25pt 344,16 Name: Chucri Simon
Zouein. TopLeft | |
- Add
the Label
control
- Label2, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label2 Microsoft Sans Serif,
8.25pt 344,16 Address: Lebanon, Beirut,
Sed El Baouchrie,
... TopLeft | |
- Add
the Label
control
- Label3, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label3 Microsoft Sans Serif,
8.25pt 344,16 Signification: Engineer on
Computing and
... TopLeft | |
- Add
the Label
control
- Label4, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label4 Microsoft Sans Serif,
8.25pt 344,16 Tel: 961.
01.691436. TopLeft | |
- Add
the Label
control
- Label5, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label5 Microsoft Sans Serif,
8.25pt 344,16 Web:
www.puresoftwarecode.com
TopLeft | |
- Add
the Label
control
- Label6, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label6 Microsoft Sans Serif,
8.25pt 344,16 E-mail:
info@puresoftwarecode.com TopLeft | |
- Add
the Label
control
- Label7, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label7 Microsoft Sans Serif,
8.25pt 344,16 All right reserved
TopLeft | |
- Add
the Label
control
- Line1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Line1 Microsoft Sans Serif,
8.25pt 344,16
TopLeft | |
- Add
the Button
control - btnDone, Button
Properties:
Name: BackColor: Size: Text: |
btnDone Scrollbar 80,24 Done | | | | |
|
Biography.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
App_CAKJV10
{
public
partial
class
Biography
:
Form
{
// Declaration, MainForm Form
App_CAKJV10. MainForm
fm =
new
MainForm();
int IcoNmbr = 0;
public Biography()
{
InitializeComponent();
}
private
void
Biography_Load(object
sender, System.EventArgs
e)
{
// StatusBar Panel N1 = Message
//fm.Show();
fm.statusBarPanel1.Text =
"Ready ...";
fm.Refresh();
}
private
void
btnDone_Click(object
sender, System.EventArgs
e)
{
this.Close();
// StatusBar Panel 1, Message ...
fm.Show();
fm.statusBarPanel1.Text =
"Hello ...";
fm.Refresh();
}
private
void
timer1_Tick(object
sender, System.EventArgs
e)
{
if (IcoNmbr == 0)
{
this.pictureBox1.Image
=
this.pictureBox2.Image;
IcoNmbr = 1;
}
else
{
this.pictureBox1.Image
=
this.pictureBox3.Image;
IcoNmbr = 0;
}
}
}
}
| | |
|
|