ext= - ) then Abort; (Sender as TLabeledEdit) dopos (DecimalSeparator, Text)=1 then := 0 + Text;:=Length (Text) ;; (pos (DecimalSeparator, Text) lt; gt; Length (Text)) thenText [Length (Text)] lt; gt; 0 thenFloatToStr (StrToFloat (Text)) lt; gt; 0 then:=FloatToStr (StrToFloat (Text)); Key=8 then:=SelStart;:=Text; (S, n, 1);:=S ;;:=Length (Text) ;;; TForm3. BitBtn4Click (Sender: TObject);// Вихід по кнопці:=Application. MessageBox ( Завершити програму? Raquo ;, Вихід raquo ;, mb_YesNo + mb_IconAsterisk); (A=idYes) then begin form3. Hide; form4. Close; end; (a=idNo) then Abort ;. Refresh ;; TForm3. FormContextPopup (Sender: TObject; MousePos: TPoint; Handled: Boolean);:=true ;; TForm3.N7Click (Sender: TObject);// Про програму. Show ;; TForm3. FormKeyUp (Sender: TObject; var Key: Word;//Хелп по F1: TShiftState); Key=vk_F1 then (Application. Handle, open raquo ;, PChar ( base/helpm ), nil, nil, SW_SHOW) ;; TForm3.N6Click (Sender: TObject);// Хелп (Application. Handle, open raquo ;, PChar ( base/helpm ), nil, nil, SW_SHOW) ;; TForm3. LabeledEdit3KeyPress (Sender: TObject; var Key: Char);
//Безліч чисел, допустимих для введення в edit:
const Digit: set of Char=[ 1 .. 9 raquo ;, 0 , # 8];
//Безліч символів, які сприймаються як символ-роздільник:
Separator: set of Char=[/ raquo ;, . raquo ;, laquo ;, raquo ;, ю raquo ;, Ю raquo ;, б raquo ;, Б ] ;. mediaplayer1. FileName:=ExtractFilePath (ParamStr (0)) + base/keyboard.wav raquo ;;. Mediaplayer1. Open; .mediaplayer1.play; Length (LabeledEdit3.text) gt; 2 then key:=# 0;// Обмежує максимальне число (до 999)
with (Sender as TLabeledEdit) do (Key in Separator) Key:=DecimalSeparator//Delphi-константа типу Char, рівна символу-разделителю Windows (not (Key in Digit)) Key:=# 0 ; ((Key=DecimalSeparator) and (pos (DecimalSeparator, Text) lt; gt; 0)) Key:=# 0 ;;; TForm3. LabeledEdit3KeyUp (Sender: TObject; var Key: Word ;: TShiftState); n: Integer ;: String; (LabeledEdit3. Text= - ) then Abort; (Sender as TLabeledEdit) dopos (DecimalSeparator, Text)=1 then := 0 + Text;:=Length (Text) ;; (pos (DecimalSeparator, Text) lt; gt; Length (Text)) thenText [Length (Text)] lt; gt; 0 thenFloatToStr (StrToFloat (Text)) lt; gt; 0 then:=FloatToStr (StrToFloat (Text)); Key=8 then:=SelStart;:=Text; (S, n, 1);:=S ;;:=Length (Text) ;;;. Unit4;
, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, ExtCtrls, StdCtrls, OleCtrls, SHDocVw, MSHTML, MPlayer ,, XPMan;
=class (TForm): TTimer ;: TMediaPlayer ;: TImage ;: TLabel ;: TLabel ;: TXPManifest ;: TWebBrowser ;: TLabel ;: TTimer ;: TLabel; Timer1Timer (Sender: TObject); FormActivate (Sender: TObject); WebBrowser1DownloadComplete (Sender: TObject); Timer2Timer (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm4;: integer; Unit1, Unit2, Unit3, Unit5;
{$ R * .dfm} TForm4. WebBrowser1DownloadComplete (Sender: TObject);// Прибрати з анімації лішнееа: IHTMLDocument2 ;: IHTMLElement;:=IHTMLDocument2 (TWebBrowser (Sender) .Document); Doc=nil then Exit;:=Doc.body; Element=nil then Exit; .style.borderStyle:= none raquo ;;. OleObject.document.body.style.overflowX:= hidden raquo ;;. OleObject.document.body.style.overflowY:= hidden raquo ;;; TForm4. Timer1Timer (Sender: TObject) ;. Tag:=timer1. Tag - 1; timer1. Tag of
: begin timer1. Enabled:=false; form4. Hide ;. Show; end ;;; TForm4. FormActivate (Sender: TObject) ;. Picture. LoadFromFile (ExtractFilePath (ParamStr (0)) + base/1.jpg ) ;. Left:=(Screen. Width div 2) - (Form4. Width div 2) ;. Top:=(Screen. Height div 2) - (Form4. Height div 2) ;. Tag:=8 ;. Caption:= Побудова графіків функцій raquo ;;. Navigate (ExtractFilePath (ParamStr (0)) + base/1.html ) ;; TForm4. Timer2Timer (Sender: TObject) ;. Caption:=FormatDateTime ( dd.mm.yyyy tt raquo ;, now) ;. Label3. Caption:=FormatDateTime ( dd.mm.yyyy tt raquo ;, now) ;. Label3. Caption:=FormatDateTime ( dd.mm.yyyy tt raquo ;, now) ;. Label2. Caption:=FormatDateTime ( dd.mm.yyyy tt raquo ;, now) ;;. Unit5;
, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, ExtCtrls, shellapi, XPMan;
=class (TForm): TImage ;: TLabel ;: TButton ;: TXPManifest ;: TLabel; Button1Click (Sender: TObject); FormActivate (Sender: TObject); FormKeyUp (Sender: TObject; var Key:Word ;: TShiftState);
{Private declarations}
{Public declarations} ;: TForm5; Unit1, Unit2, Unit3, Unit4;
{$ R * .dfm} TForm5. Button1Click (Sender: TObject) ;. close ;; TForm5. FormActivate (Sender: TObject) ;. Picture...