|
The Form design,
introductory
Create Delphi 8 Windows Forn - introductory
Classes used in this Form: System.Drawing,
System.Collections, System.ComponentModel, System.Windows.Forms,
System.Data, System.Resources;
Classes used in this
Form:
PictureBox, Button
Create the Form
introductory
- 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 |
introductory.,pas |
|
|
|
|
2. |
TWinForm- Form name created
|
|
|
Old |
New |
Caption:
Name:
Icon:
FormBorderstyle:
Maximizebox:
StartPosition:
Size:
Text: |
WinForm
TWinForm
(Icon)
Sizable
True
WindowsDefaultLocation
300,300
WinForm |
introductory
Tintroductory
(Icon)
None
False
CenterScreen
488,344
|
|
|
|
|
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 file
awork.bmp
|
2. |
The introductory design |
|
 |
.. |
| |
3. |
From the Tool palette add these
controls ...
(From the View menu, click Tool
palette)
. Tree PictureBox controls, eight
Label controls and one Button
control. |
|
- Add the PictureBox
control - Picico. Object inspector
Name: Image: Size
Mode: |
Picico System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\work_Delphinet\pic\awork.bmp
- Add the Button
control - btnDone. Object inspector
Name: BackColor: Size: Text: |
btnDone Scrollbar 80,24 Done | | | | |
|
introductory file, the codes after modification
...
The
text
Code is
red
color, the codes added
manuel |
|
unit introductory;
interface
uses
System.Drawing, System.Collections,
System.ComponentModel,
System.Windows.Forms, System.Data, System.Resources;
type
Tintroductory = 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 Showintroductory:
System.Windows.Forms.DialogResult;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(Tintroductory))]
implementation
uses
mainform;
Windows Form Designer
generated code |
procedure
Tintroductory.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor Tintroductory.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
// TODO: Add any constructor code after
InitializeComponent call
//
end;
class function
Tintroductory.Showintroductory:
System.Windows.Forms.DialogResult;
begin
with Tintroductory.Create do
Result := ShowDialog;
end;
procedure Tintroductory.PictureBox1_Click(sender:
System.Object; e: System.EventArgs);
begin
close;
end;
end. | | |
|
|