22-4
:
: . , ,
. , , .
, , . . .
, , ( ) . .
() :
Position: =Screennter;
FormStyle: =fsStayOnTop;
Caption:=;
BorderStyle: =bsNone;
BorderIcons:=[];
, - , . , MainForm, - ZastForm. :
1. -
Program Zastavka;
Uses
Forms,
Main in Main.pas' {MainForm},
Zastavka in 'Zastavka.pas' {ZastavkaForm};
{$R *.res}
Begin
Application.Initialize;
//
ZastavkaForm:=TZastavkaForm.Create(Application);
ZastavkaForm.Show;
ZastavkaForm.Update;
//
Application.CreateForm(TMainForm, MainForm);
//
ZastavkaForm.Hide;
ZastavkaForm.Free;
//
Application.Run;
End.
- . Show Update. Show, Windows. , Update.
. Hide Free. , , .
, , . , , .
|
|
. , , , , . , About.
. Delphi File New Other. Forms About Box. AboutBox About. (. .1).
. 1, ( TImage) ( TLabel), . , .
, , , . , , ModalResult mrOK, .
, , , .
, ShowModal. , .
. - , , , Word. , ..
Delphi TStatusBar, , , . Panels .
.
1. TStatusBar
SimplePanel ( Boolean) | , . , True, - False. |
SimpleText ( string) | , , SimplePanel True. |
AutoHint ( Boolean) | True, , (Hint). . |
Count ( Integer) | . . |
SizeGrip ( Boolean) | . True, , . , , . BorderStyle bsSizeable bsSizeToolWin, . |
Panels( TStatusPanels) | . ( ). |
|
|
TStatusPanels .
2. TStatusPanels
Alignment ( TAlignment) | . |
Bevel ( TStatusPanelBevel) | : , |
Style ( TStatusPanel Style) | : psText Text ( ); psOwnerDraw (anvas) . |
t ( String) | , . |
Width ( Integer) | . 50 , . |
, , , .
1: .
1. FileNew , Name Zast.
2. Caption.
3. BorderStyle bsNone ( ).
4. , BorderIcons biMinimize, biMaximize, biSystemMenu False ( ).
5. Enabled False , .
6. , Zastavka.
7. ViewProject Manager Options. Forms. Zast AutoCreate Available .
8. . Project ViewSource begin end :
Zast:= TZast.Create(Application);
{
Zast, }
Zast.Show;
Zast.Update;
{ }
Application.CreateForm(TForm1, MainForm);
Zast.Hide;
Zast.Free;
{ }
Application.Run;
9. , , OnCreate MainForm :
CurrentTime:=GetTickCount div 1000;
{ CurrentTime Windows }
while((GetTickCount div 1000)<(CurrentTime+4)) do;
{ 4 }
CurrentTime Longint.
10. TImage Additional . Picture Image1. Picture Editor Load, Picture Editor. , Image1 , Stretch True.
|
|
11. TLabel Standard . , , .
12. .
2: .
1. .
2. AboutBox . Delphi File New Other. Forms About Box. AboutBox About.
3. , ShowModal.
4. .
3: .
1. oClock. oClock, , , , .
2. oClock TLabel, Caption 00:00:00. , .
3. oClock TTimer System. OnTimer imer1 :
TimerLabel.Caption:=TimeToStr(Time); //TimeToStr
4. OnCreate oClock Timer1Timer, Timer1. .
5. oClock Formstyle fsStayOnTop , . , Visible True.
6. .
4: .
1. TStatusBar ( Win32). AutoHint True.
2. Panels EditingStatusBar.Panel, . Text . 3.
3. Width , .
4. ToolBar1 Hint (). :
0: (Hint), , .
1: m1.
2: m1 ( ).
3: sLock ( , s Lock , , s Lock ).
4: , m1.
5: .
1.
1.
//
procedure TMainForm.ToolButton4Click(Sender: TObject);
Begin
with (ActiveMDIChild as TChildForm) do
Memo1.Font.Color:=clBlack;
|
|
StatusBar1.Panels[1].Text:=' ';
End;
//
procedure TMainForm.ToolButton7Click(Sender: TObject);
Begin