|
The Form design,
about
Create Delphi 8 Windows Forn - about
Classes used in this Form: System.Drawing,
System.Collections, System.ComponentModel, System.Windows.Forms,
System.Data, System.Resources;
Classes used in this
Form: Timer,
PictureBox, Button, Label,
Textbox
Create the Form
about
- On the File menu ,
click New. and then click Windows Form
. |
 |
- New File
name WinForm.pas appears. (Form name - TWinForm)
- On the View menu ,
click Object Inspector. In Object Inspector
modify the following
|
|
1. |
WinForm.pas - the File name created
|
|
|
Old |
New |
File
Name: |
WinForm.pas |
about.,pas |
|
|
|
|
2. |
TWinForm- Form name created
|
|
|
Old |
New |
Caption:
Name:
Icon:
Menu:
Maximizebox:
StartPosition:
Size:
Text: |
WinForm
TWinForm
(Icon)
(none)
True
WindowsDefaultLocation
300,300
WinForm |
about
Tabout
(Icon)
(none)
False
CenterScreen
368,332
about
... |
|
|
|
|
3. |
Save this
file ... On the
File menu , click Save |
|
|
|
1. |
Picture files used by this form ...
|
|
- The folder
c:\work_Delphinet\pic stored the bmp
files wdesn.bmp, wdesn1.bmp,
wdesn2.bmp
|
2. |
The about
design |
|
|
3. |
From the Tool palette add these
controls ...
(From the View menu, click Tool
palette)
. 3 PictureBox
controls, 12 Label controls, 5
TextBox controls, 1 Panel control, 1
Timer contol and 2 Button
controls. |
|
- Add the PictureBox
control - Picico. Object
inspector:
Name: Image: Size
Mode: |
Picico System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_Delphinet\pic\wdesn.bmp
- Add the PictureBox
control - Picicoorg0. Object inspector
Name: Image: Size
Mode: |
Picicoorg0 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_Delphinet\pic\wdesn1.bmp
- Add the PictureBox
control - Picicoorg1.
Object inspector:
Name: Image: Size
Mode: |
Picicoorg1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_Delphinet\pic\wdesn2.bmp
- Add the Label
control
- Label1. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label1 Microsoft Sans Serif,
8.25pt 232,16 Borland Delphi Net
application TopLeft | |
- Add the Label
control
- Label2. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label2 Microsoft Sans Serif,
8.25pt 232,16 Created by Chucri
Simon
Zouein. TopLeft | |
- Add the Label
control
- Label3. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label3 Microsoft Sans Serif,
8.25pt 232,16 Tel:
961-
01-691436. TopLeft | |
- Add the Label
control
- Label4. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label4 Microsoft Sans Serif,
8.25pt 232,16 Web:
www.puresoftwarecode.com
TopLeft | |
- Add the Label
control
- Label5. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label5 Microsoft Sans Serif,
8.25pt 232,16 E-mail:
info@puresoftwarecode.com TopLeft | |
- Add the Label
control
- Label6. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label6 Microsoft Sans Serif,
8.25pt 232,16 Beirut, Lebanon. All right
reserved ...
TopLeft | |
- Add the Button
control - btnDone. Object inspector
Name: BackColor: Size: Text: |
btnDone Silver 80,24 Done | |
- Add the Button
control - btndetail. Object inspector
Name: BackColor: Size: Text: |
btndetail Silver 80,24 detail | |
- Add the Label
control
- Line1. Object
inspector
Name: Font: Size: Text: TextAlign: |
Label Microsoft Sans Serif,
8.25pt 256,2
TopLeft | |
- Add the Panel
control
- Panel1. Object inspector:
- Add the Label
control
- Label7. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label7 Microsoft Sans Serif,
8.25pt 130,16 computer
nane TopLeft | |
- Add the TextBox
control
- TextBox1.
Object inspector
Name: Font: Size: Text: |
TextBox1 Microsoft Sans Serif,
8.25pt 200,20 | |
- Add the Label
control
- Label8. Object
inspector
Name: Font: Size: Text: TextAlign: |
Label8 Microsoft Sans Serif,
8.25pt 130,16 registered
owner TopLeft | |
- Add the TextBox
control
- TextBox2.
Object inspector
Name: Font: Size: Text: |
TextBox2 Microsoft Sans Serif,
8.25pt 200,20 | |
- Add the Label
control
- Label9. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label9 Microsoft Sans Serif,
8.25pt 130,16 operating system
nane TopLeft | |
- Add the TextBox
control
- TextBox3. Object inspector
Name: Font: Size: Text: |
TextBox3 Microsoft Sans Serif,
8.25pt 200,20 | |
- Add the Label
control
- Label10. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label10 Microsoft Sans Serif,
8.25pt 130,16 operating system
version TopLeft | |
- Add the TextBox
control
- TextBox4. Object inspector
Name: Font: Size: Text: |
TextBox4 Microsoft Sans Serif,
8.25pt 200,20 | |
- Add the Label
control
- Label11. Object
inspector:
Name: Font: Size: Text: TextAlign: |
Label11 Microsoft Sans Serif,
8.25pt 130,16 windows root
folder TopLeft | |
- Add the TextBox
control
- TextBox5. Object inspector
Name: Font: Size: Text: |
TextBox5 Microsoft Sans Serif,
8.25pt 200,20 | | | | |
|
about file, the codes after modification
...
The
text
Code is
red
color, the codes added
manuel |
|
unit about;
interface
uses
System.Drawing, System.Collections,
System.ComponentModel,
System.Windows.Forms, System.Data, SysUtils,
System.Resources;
type
Tabout = class(System.Windows.Forms.Form)
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
class function Showabout:
System.Windows.Forms.DialogResult;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(Tabout))]
implementation
var
IcoNmbr: Integer;
Windows Form Designer
generated code |
procedure
Tabout.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor Tabout.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
// TODO: Add any constructor code after
InitializeComponent call
//
end;
class function Tabout.Showabout:
System.Windows.Forms.DialogResult;
begin
with Tabout.Create do
Result := ShowDialog;
end;
procedure Tabout.Tabout_Load(sender: System.Object; e:
System.EventArgs);
begin
Self.Height := Self.btnDone.Top +
System.Convert.ToInt16(Self.btnDone.Height * 9 div 4);
Self.Btndetail.Text := 'detail';
Self.Panel1x.Top := Self.Label5.Top + Self.Label5.Height
* 7 div 4;
Self.TextBox1.Text :=
System.Convert.ToString(System.Environment.MachineName);
Self.TextBox2.Text :=
System.Convert.ToString(System.Environment.UserName);
Self.TextBox3.Text :=
System.Convert.ToString(System.Environment.OSVersion);
Self.TextBox4.Text :=
System.Convert.ToString(System.Environment.Version);
Self.TextBox5.Text :=
System.Convert.ToString(System.Environment.SystemDirectory);
IcoNmbr := 0;
end;
procedure Tabout.Timer1_Tick(sender: System.Object; e:
System.EventArgs);
begin
if (IcoNmbr = 0) then
begin
Self.picico.Image := Self.picicoOrg0.Image;
IcoNmbr := 1;
end
else
begin
Self.picico.Image := Self.picicoOrg1.Image;
IcoNmbr := 0;
end;
end;
procedure Tabout.Btndetail_Click(sender: System.Object;
e: System.EventArgs);
begin
if (Self.Btndetail.Text = 'detail') then
begin
Self.Height := Self.Panel1.Top + Self.Panel1.Height +
Self.btnDone.Height;
Self.Btndetail.Text := 'hide';
end
else if (Self.Btndetail.Text = 'hide') then
begin
Self.Height := Self.btnDone.Top +
System.Convert.ToInt16(Self.btnDone.Height * 9 div 4);
Self.Btndetail.Text := 'detail';
end;
end;
procedure Tabout.BtnDone_Click(sender: System.Object; e:
System.EventArgs);
begin
Close;
end;
end.
| | |
|
|