|
The Form design,
about.cs
Create Visual C# .Net Forn - about.cs
Classes used in this
Form: Timer,
PictureBox, Button, Label,
Textbox
- 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 about.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
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_VCnet\pic\wdesn.bmp
- Add the PictureBox
control - Picicoorg0 Properties:
Name: Image: Size
Mode: |
Picicoorg0 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_VCnet\pic\wdesn1.bmp
- Add the PictureBox
control - Picicoorg1,
PictureBox Properties:
Name: Image: Size
Mode: |
Picicoorg1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_VCnet\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# .net
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
...
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 about.
///
</summary>
public
class
about : System.Windows.Forms.Form
{
internal
System.Windows.Forms.Button Btndetail;
internal
System.Windows.Forms.Label Label4;
internal
System.Windows.Forms.Label Label1;
internal
System.Windows.Forms.PictureBox picicoOrg1;
internal
System.Windows.Forms.PictureBox picico;
internal
System.Windows.Forms.Button btnDone;
internal
System.Windows.Forms.Label Label7;
public
System.Windows.Forms.Label Line1;
internal
System.Windows.Forms.PictureBox picicoOrg0;
internal
System.Windows.Forms.Label label6;
internal
System.Windows.Forms.Label Label2;
internal
System.Windows.Forms.Label Label5;
internal
System.Windows.Forms.Panel Panel1;
internal
System.Windows.Forms.Label Label11;
internal
System.Windows.Forms.Label Label10;
internal
System.Windows.Forms.Label Label9;
internal
System.Windows.Forms.Label Label8;
internal
System.Windows.Forms.Label Label3;
internal
System.Windows.Forms.TextBox TextBox5;
internal
System.Windows.Forms.TextBox TextBox4;
internal
System.Windows.Forms.TextBox TextBox3;
internal
System.Windows.Forms.TextBox TextBox2;
internal
System.Windows.Forms.TextBox TextBox1;
internal
System.Windows.Forms.Timer Timer1;
private
System.ComponentModel.IContainer components;
// variable
int
IcoNmbr = 0;
public
about()
{
//
// 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 about_Load(object
sender, System.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, System.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, System.EventArgs e)
{
this.Close();
}
private void
Timer1_Tick(object
sender, System.EventArgs e)
{
if
(IcoNmbr == 0)
{
this.picico.Image
= this.picicoOrg0.Image;
IcoNmbr = 1;
}
else
{
this.picico.Image = this.picicoOrg1.Image;
IcoNmbr = 0;
}
}
}
}
| | |
|
|