procedure delay(msec:longint); var start,stop:longint; begin start := gettickcount; repeat stop := gettickcount; application.processmessages; until (stop - start ) ›= msec; end;...
function IsStrANumber( const S: String): Boolean; var P:PChar; begin P:=PChar(S); result:=False; while P^ #130 do begin if not (P^ in ['0'..'9']) then exit; ...
L'exemple 'Tout inclure dans l'exe' dans le Grenier de FOBEC vous montre comment inclure Bmp,curseur, MP3, exe, ... directement dans le programme
procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption:=inttostr(strtoint('$AFFE')); //45054 end;
procedure TForm1.Button1Click(Sender: TObject); var datum1, datum2 :TDateTime; d if ferenz:integer; begin datum1:=EncodeDate(2000,06,15); //Date 2000/06/15 datum2:=EncodeDate(2000,01,01);...
{Valeurs prédéfinies dans Delphi- DateSeparator- ShortDateFormat- LongDateFormat;- ShortMonthNames;- LongMonthNames;- ShortDayNames;- LongDayNames;}//change le format de la date procedure ...
var FirstWeekDay : Integer = 2; function WeekToDate(AWeek,AYear:Integer):TDateTime; begin Result:=EncodeDate(AYear,1,FirstWeekDate); ...
function IsEMail(EMail: String): Boolean; var s: String; ETpos: Integer; begin ETpos:= pos('@', EMail); if ETpos > 1 then begin s:= copy(EMail,ETpos+1,Length(EMail)); if...
function ColorToHtml( Color: TColor ): string; begin Result := '#' + IntToHex( Color and $FF, 2 ) + IntToHex( Color shr 8 and $FF, 2 ) + IntToHex( Color shr 16 and $FF, 2 ); end; ...
procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption := Format('%.*d', [10,1456]); end;
function LastDayOfCurrentMonth: TDate; var y, m, d: word; begin decodedate(now, y, m, d); m := m + 1; if m > 12 then begin y := y + 1; m := 1; end; result := encodedate(y, m,...
function RandomPassword(PLen:Integer):String; var str:String; begin Randomize; //l'ensemble des caractères str:='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; ...
procedure TForm1.Button1Click(Sender: TObject); var LoopAborted : boolean; i : integer; begin LoopAborted := false; i := 0; repeat // Your Code... Caption := inttostr(i); ...
function IsStrFloatNum(s:String) : boolean; begin try // try to convert the string into a floatnumber StrToFloat(s); // if there is no error the result is true result := true; ...
Dans votre unité projet (.dpr): uses Forms, Sysutils, Dialogs, MyProgr in my_prog1.pas {Form1}; const email = 'my.mail@provider.xyz'; homepage = 'http://www.myhomepage.com'; //...
La principale fonction de ce lecteur est d'écouter des musiques au format Mp3, wav, cdaudio, wma, .... L'utilisation est très simple, tout ce qu'il faut est au bon endroit,bref le petit...
uses Registry;{...} procedure GetOwnerAndCompanyName( var sOwner, sOrganization : string); var reg: TRegistry; begin reg:= TRegistry.Create; try reg.RootKey:= HKEY_LOCAL_MACHINE; if ...
uses OLECtl; var OCXHand: THandle; RegFunc: TDllRegisterServer; begin OCXHand := LoadLibrary ('C:WindowsSystemMyFile.ocx'); RegFunc:= GetProcAddress (OCXHand,...
procedure TForm1.Button1Click(Sender: TObject); const UNINST_PATH = 'SOFTWAREMicrosoftWindowsCurrentVersionUninstall'; var Reg: TRegistry; SubKeys: TStringList; ListItem: TlistItem; ...
// Afficher le menu démarrerkeybd_event(VK_LWIN, MapVirtualKey(VK_LWIN, 0), 0, 0);keybd_event(VK_LWIN, MapVirtualKey(VK_LWIN, 0), KEYEVENTF_KEYUP, 0)//la boîte de dialogue...