|
The
Form design, about.cs
Create Visual C# 2010 Forn - about.cs
Classes used in this Form: Timer,
PictureBox, Button, Label,
Textbox
Create the Form
about.cs
Add New Item -
about.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
about.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 about.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
about :
Form
{
public
about()
{
InitializeComponent();
}
private
void about_Load(object
sender,
EventArgs
e)
{
}
}
}
|
|
|
|
|
1. |
Picture files used by this form ...
|
|
- The folder
c:\work_VCNet10\work_VCNet10\pic stored the
bmp files wdesn.bmp,
wdesn1.bmp,
wdesn2.bmp
|
2. |
The about.cs
design |
|
 |
The Properties of
the Form -
about.cs... |
Name: Icon: Maximize: Menu: Size: Start
Position: Text: Window
State: |
about Icon False (none) 368,332 CenterScreen about
... Normal | | | |
3. |
From the Toolbox/Windows Form add these
controls .... 3 PictureBox
controls, 12 Label
controls, 5 TextBox controls, 1
Panel control, 1
Timer contol and 2 Button
controls. |
|
- 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\wdesn.bmp
- Add
the PictureBox
control - Picicoorg0
Properties:
Name: Image: Size
Mode: |
Picicoorg0 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_VCNet10\work_VCNet10\pic\wdesn1.bmp
- Add
the PictureBox
control - Picicoorg1,
PictureBox Properties:
Name: Image: Size
Mode: |
Picicoorg1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_VCNet10\work_VCNet10\pic\wdesn2.bmp
- Add
the Label
control
- Label1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label1 Microsoft Sans Serif,
8.25pt 232,16 Visual C# 2010
application TopLeft | |
- Add
the Label
control
- Label2, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label2 Microsoft Sans Serif,
8.25pt 232,16 Created by Chucri
Simon
Zouein. TopLeft | |
- Add
the Label
control
- Label3, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label3 Microsoft Sans Serif,
8.25pt 232,16 Tel:
961-
01-691436. TopLeft | |
- Add
the Label
control
- Label4, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label4 Microsoft Sans Serif,
8.25pt 232,16 Web:
www.puresoftwarecode.com
TopLeft | |
- Add
the Label
control
- Label5, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label5 Microsoft Sans Serif,
8.25pt 232,16 E-mail:
info@puresoftwarecode.com TopLeft | |
- Add
the Label
control
- Label6, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label6 Microsoft Sans Serif,
8.25pt 232,16 Beirut, Lebanon. All right
reserved ...
TopLeft | |
- Add
the Button
control - btnDone, Button
Properties
Name: BackColor: Size: Text: |
btnDone Silver 80,24 Done | |
- Add
the Button
control - btndetail, Button
Properties
Name: BackColor: Size: Text: |
btndetail Silver 80,24 detail | |
- Add
the Label
control
- Line1, Label
Properties
Name: Font: Size: Text: TextAlign: |
Label Microsoft Sans Serif,
8.25pt 256,2
TopLeft | |
- Add
the Panel
control
- Panel1, Panel
Properties:
- Add
the Label
control
- Label7, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label7 Microsoft Sans Serif,
8.25pt 130,16 computer
nane TopLeft | |
- Add
the TextBox
control
- TextBox1,
TextBox Properties
Name: Font: Size: Text: |
TextBox1 Microsoft Sans
Serif,
8.25pt 200,20 | |
- Add
the Label
control
- Label8, Label
Properties
Name: Font: Size: Text: TextAlign: |
Label8 Microsoft Sans Serif,
8.25pt 130,16 registered
owner TopLeft | |
- Add
the TextBox
control
- TextBox2,
TextBox Properties
Name: Font: Size: Text: |
TextBox2 Microsoft Sans
Serif,
8.25pt 200,20 | |
- Add
the Label
control
- Label9, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label9 Microsoft Sans Serif,
8.25pt 130,16 operating system
nane TopLeft | |
- Add
the TextBox
control
- TextBox3,
TextBox Properties:
Name: Font: Size: Text: |
TextBox3 Microsoft Sans
Serif,
8.25pt 200,20 | |
- Add
the Label
control
- Label10, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label10 Microsoft Sans
Serif,
8.25pt 130,16 operating system
version TopLeft | |
- Add
the TextBox
control
- TextBox4,
TextBox Properties:
Name: Font: Size: Text: |
TextBox4 Microsoft Sans
Serif,
8.25pt 200,20 | |
- Add
the Label
control
- Label11, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label11 Microsoft Sans
Serif,
8.25pt 130,16 windows root
folder TopLeft | |
- Add
the TextBox
control
- TextBox5,
TextBox Properties:
Name: Font: Size: Text: |
TextBox5 Microsoft Sans
Serif,
8.25pt 200,20 | | | | |
|
about.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
about
:
Form
{
public about()
{
InitializeComponent();
}
// variable
int IcoNmbr = 0;
private
void
about_Load(object
sender,
EventArgs
e)
{
this.Height =
this.btnDone.Top
+ (this.btnDone.Height
* 9 / 4);
this.Btndetail.Text
=
"detail";
this.TextBox1.Text =
System.Environment.MachineName.ToString();
this.TextBox2.Text =
System.Environment.UserName.ToString();
this.TextBox3.Text =
System.Environment.OSVersion.ToString();
this.TextBox4.Text =
System.Environment.Version.ToString();
this.TextBox5.Text =
System.Environment.SystemDirectory.ToString();
}
private
void
Btndetail_Click(object
sender,
EventArgs
e)
{
if (this.Btndetail.Text
==
"detail")
{
this.Height =
this.Panel1.Top
+
this.Panel1.Height +
this.btnDone.Height;
this.Btndetail.Text
=
"hide";
}
else
if
(this.Btndetail.Text
==
"hide")
{
this.Height =
this.btnDone.Top
+ (this.btnDone.Height
* 9 / 4);
this.Btndetail.Text
=
"detail";
}
}
private
void
btnDone_Click(object
sender,
EventArgs
e)
{
this.Close();
}
private
void
Timer1_Tick(object
sender,
EventArgs
e)
{
if (IcoNmbr == 0)
{
this.picico.Image =
this.picicoOrg0.Image;
IcoNmbr = 1;
}
else
{
this.picico.Image =
this.picicoOrg1.Image;
IcoNmbr = 0;
}
}
}
}
| | |
|
|