|
The Form design,
Biography.cs
Create Visual C# .Net Forn - biography.cs
Classes used in this
Form: Timer,
PictureBox, Label,
Button
- On the View menu ,
click Solution Explorer
- In Solution
Explorer, right click the App-VCSNet, select Add
on the shortcut menu to open other shortcut menu, click
Add New Item, the Add New Item - App-VCSNet dialog
box appears.
- In the Add New
Item -App-VCSNet 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 Biography.cs
- Click Open
- In the windows
Forms Designer appears the empty window Form
design
|
1. |
Add picture file ...
|
|
- The bmp files
butterfly1.bmp and
butterfly2.bmp of the folder
c:\App-VCSNet\Pic
- On the
Projet menu , click Add Existing Item
..., Add Existing Item - App-VCSNet dialog box
appears, select the files butterfly2.bmp
of the folder c:\App-VCSNet\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-VCSNet\Pic\butterfly1.bmp
- Add the PictureBox
control - PictureBox2 Properties:
Name: Image: Size
Mode: |
PictureBox2 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VCSNet\Pic\butterfly1.bmp
- Add the PictureBox
control - PictureBox3,
PictureBox Properties:
Name: Image: Size
Mode: |
PictureBox3 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VCSNet\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
...
The text
Code
is red color & Bold, corresponding to Load data in the Statusbar
control
The text Code is navy color & Bold,
correspondig to public access on one or more
declared programming elements |
|
using
System; using
System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace App_VCSNet
{
///
<summary>
///
Summary description for Biography.
///
</summary>
public
class
Biography : System.Windows.Forms.Form
{
internal
System.Windows.Forms.Label Label7;
private
System.Windows.Forms.Button btnDone;
public
System.Windows.Forms.Label Line1;
internal
System.Windows.Forms.Label label6;
internal
System.Windows.Forms.Label Label3;
internal
System.Windows.Forms.Label Label5;
internal
System.Windows.Forms.Label Label4;
private
System.Windows.Forms.PictureBox pictureBox3;
private
System.Windows.Forms.PictureBox pictureBox2;
private
System.Windows.Forms.PictureBox pictureBox1;
internal
System.Windows.Forms.Label Label2;
internal
System.Windows.Forms.Label Label1;
private
System.Windows.Forms.Timer timer1;
private
System.ComponentModel.IContainer components;
//
Declaration, MainForm Form
App_VCSNet.MainForm fm = new
MainForm();
int
IcoNmbr = 0;
public
Biography()
{
//
// 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 );
}
#region Windows Form Designer
generated code
///
<summary>
///
Required method for Designer support - do not modify
///
the contents of this method with the code editor.
///
</summary>
private
void
InitializeComponent()
{
this.components
= new
System.ComponentModel.Container();
System.Resources.ResourceManager resources =
new
System.Resources.ResourceManager(typeof(Biography));
this.Label7
= new
System.Windows.Forms.Label();
this.btnDone
= new
System.Windows.Forms.Button();
this.Line1
= new
System.Windows.Forms.Label();
this.label6
= new
System.Windows.Forms.Label();
this.Label3
= new
System.Windows.Forms.Label();
this.Label5
= new
System.Windows.Forms.Label();
this.Label4
= new
System.Windows.Forms.Label();
this.pictureBox3
= new
System.Windows.Forms.PictureBox();
this.pictureBox2
= new
System.Windows.Forms.PictureBox();
this.pictureBox1
= new
System.Windows.Forms.PictureBox();
this.Label2
= new
System.Windows.Forms.Label();
this.Label1
= new
System.Windows.Forms.Label();
this.timer1
= new
System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// Label7
//
this.Label7.Location
= new
System.Drawing.Point(104, 152);
this.Label7.Name
= "Label7";
this.Label7.Size
= new
System.Drawing.Size(160, 16);
this.Label7.TabIndex
= 28;
this.Label7.Text
= "All right reserved ... ";
//
// btnDone
//
this.btnDone.Font
= new
System.Drawing.Font("Times New Roman", 9.75F,
System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnDone.Location
= new
System.Drawing.Point(392, 152);
this.btnDone.Name
= "btnDone";
this.btnDone.TabIndex
= 27;
this.btnDone.Text
= "Done";
this.btnDone.Click
+= new
System.EventHandler(this.btnDone_Click);
//
// Line1
//
this.Line1.BackColor
= System.Drawing.SystemColors.WindowText;
this.Line1.Location
= new
System.Drawing.Point(104, 144);
this.Line1.Name
= "Line1";
this.Line1.Size
= new
System.Drawing.Size(368, 1);
this.Line1.TabIndex
= 26;
//
// label6
//
this.label6.Location
= new
System.Drawing.Point(112, 120);
this.label6.Name
= "label6";
this.label6.Size
= new
System.Drawing.Size(304, 16);
this.label6.TabIndex
= 25;
this.label6.Text
= "E-mail: info@puresoftwarecode.com";
//
// Label3
//
this.Label3.Location
= new
System.Drawing.Point(112, 48);
this.Label3.Name
= "Label3";
this.Label3.Size
= new
System.Drawing.Size(360, 16);
this.Label3.TabIndex
= 22;
this.Label3.Text
= "Signification: Engineer on Computing and Software
Systems Science.";
//
// Label5
//
this.Label5.Location
= new
System.Drawing.Point(112, 96);
this.Label5.Name
= "Label5";
this.Label5.Size
= new
System.Drawing.Size(304, 16);
this.Label5.TabIndex
= 24;
this.Label5.Text
= "Web: www.puresoftwarecode.com ";
//
// Label4
//
this.Label4.Location
= new
System.Drawing.Point(112, 72);
this.Label4.Name
= "Label4";
this.Label4.Size
= new
System.Drawing.Size(304, 16);
this.Label4.TabIndex
= 23;
this.Label4.Text
= "Tel: 961. 01.691436.";
//
// pictureBox3
//
this.pictureBox3.Image
= ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location
= new
System.Drawing.Point(192, 184);
this.pictureBox3.Name
= "pictureBox3";
this.pictureBox3.Size
= new
System.Drawing.Size(77, 77);
this.pictureBox3.SizeMode
= System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox3.TabIndex
= 19;
this.pictureBox3.TabStop
= false;
//
// pictureBox2
//
this.pictureBox2.Image
= ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location
= new
System.Drawing.Point(96, 184);
this.pictureBox2.Name
= "pictureBox2";
this.pictureBox2.Size
= new
System.Drawing.Size(77, 77);
this.pictureBox2.SizeMode
= System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox2.TabIndex
= 18;
this.pictureBox2.TabStop
= false;
//
// pictureBox1
//
this.pictureBox1.Image
= ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location
= new
System.Drawing.Point(8, 24);
this.pictureBox1.Name
= "pictureBox1";
this.pictureBox1.Size
= new
System.Drawing.Size(77, 77);
this.pictureBox1.SizeMode
= System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex
= 17;
this.pictureBox1.TabStop
= false;
//
// Label2
//
this.Label2.Location
= new
System.Drawing.Point(112, 24);
this.Label2.Name
= "Label2";
this.Label2.Size
= new
System.Drawing.Size(392, 16);
this.Label2.TabIndex
= 21;
this.Label2.Text
= "Address: Lebanon, Beirut, Sed El Baouchrie, Ferdaous
Str., Korlokian Bld. " +
"";
//
// Label1
//
this.Label1.Location
= new
System.Drawing.Point(112, 0);
this.Label1.Name
= "Label1";
this.Label1.Size
= new
System.Drawing.Size(304, 16);
this.Label1.TabIndex
= 20;
this.Label1.Text
= "Name: Chucri Simon Zouein.";
//
// timer1
//
this.timer1.Enabled
= true;
this.timer1.Tick
+= new
System.EventHandler(this.timer1_Tick);
//
// Biography
//
this.AutoScaleBaseSize
= new
System.Drawing.Size(5, 13);
this.ClientSize
= new
System.Drawing.Size(490, 178);
this.Controls.Add(this.btnDone);
this.Controls.Add(this.Line1);
this.Controls.Add(this.label6);
this.Controls.Add(this.Label3);
this.Controls.Add(this.Label5);
this.Controls.Add(this.Label4);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.Label2);
this.Controls.Add(this.Label1);
this.Controls.Add(this.Label7);
this.FormBorderStyle
= System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name
= "Biography";
this.StartPosition
= System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text
= "Biography";
this.Load
+= new
System.EventHandler(this.Biography_Load);
this.ResumeLayout(false);
}
#endregion
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();
}
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;
}
}
}
} | | |
|
|