procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption:=ExtractFilePath(Application.exename); end;
function getdirsize (dir: string; subdir: boolean): longint; var rec: TSearchRec; found: integer; begin result:=0; if dir[length(dir)]'' then dir:=dir+''; found:=...
uses shellapi function copydir(von,zieldir: String): boolean; var fos: TSHFileOpStruct; begin ZeroMemory(@fos, SizeOf(fos)); with fos do begin wFunc := FO_COPY; fFlags := FOF_FILESONLY; ...
{I think these const ants should be self explain CSIDL_DESKTOP CSIDL_INTERNET CSIDL_PROGRAMS CSIDL_CONTROLS CSIDL_PRINTERS CSIDL_PERSONAL CSIDL_FAVORITES CSIDL_STARTUP ...
Cet exemple vous montre comment extraire les informations suivantes d'un Bitmp:Taille, largeur, hauteur, résolution et nombre de couleurs. procedure TForm1.Button1Click(Sender: TObject); var ...
function InvertBmp(SourceBmp:Tbitmap): TBitMap; var i,j :longint; tmp : TBitMap; Red, Green, Blue: Byte; PixelColor: Longint; begin tmp := TBitmap.Create; tmp.width := SourceBmp.width; ...
{Executez NotePad puis lancer l'exemple ci-desous:} procedure TForm1.Button1Click(Sender: TObject); var hwindow : THandle; H: HIcon; begin hwindow := FindWindow('notepad',nil); H...
public { Public-Deklarationen } procedure WriteText(TransText: string); end; {....} var Form1: TForm1;implementation{$R *.DFM} procedure TForm1.WriteText(TransText: string); var ...
procedure TForm1.TarjaLateral(Texto: string; Size: integer); var LogFont: TLogFont; tmpCanvas: TCanvas; tmpRect: TRect; x1, x2, y1, y2: Integer; begin tmpCanvas := TCanvas.Create; ...
Revu et amélioré par Christophe Foret < christopheforet@hotmail.com >Pensez à mettre la fonction dans l'Event OnRepaint. function GrafikKacheln(dateiname: string; Sender: TObject; AStretch: ...
uses jpeg; procedure TForm1.Button1Click(Sender: TObject); var bmp : TImage; jpg : TJpegImage; begin bmp := TImage.Create(nil); jpg := TJpegImage.Create; bmp.picture.bitmap.LoadFromFile (...
DrawIcon(Image1.Canvas.handle, 0, 0, LoadCursor(0, IDC_ARROW));
Var jpeg: TJPEGImage; bmp: TBitmap;Begin jpeg:= TJPEGImage.Create; try jpeg.LoadFromFile( filename ); bmp:= TBitmap.Create; try bmp.Assign( jpeg ); bmp.SaveTofile( ChangeFileExt(...
AComponentWithACanvas.Canvas.TextWidth('A');AComponentWithACanvas.Canvas.TextHeight('X');
procedure TForm1.Button1Click(Sender: TObject); var Icono:TIcon; Bitmap:TBitmap; begin Icono:=TIcon.create; Bitmap:=TBitmap.create; Icono.LoadFromFile('c:kkChip.ico'); Bitmap.Height...
procedure WmfToBmp(FicheroWmf,FicheroBmp:string); var MetaFile:TMetafile; Bmp:TBitmap; begin Metafile:=TMetaFile.create; Bmp:=TBitmap.create; MetaFile.LoadFromFile(FicheroWmf); with Bmp do ...
procedure spiegel_horizontal(Quelle, Ziel: TBitMap); begin Ziel.Assign(nil); Ziel.width:=Quelle.width; Ziel.height:=Quelle.height; ...
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); const {caractères autorisés} AllowedChars : string = 'abcdefghijklmnopq' + 'rstuvwxyz01234567_.@'; var i :...
procedure TForm1.FormCreate(Sender: TObject); const MenuIndex = 3; var MII : TMenuItemInfo; MainMenu : hMenu; Buffer : array[0..50] of Char; begin MainMenu := GetMenu(Handle);...
procedure TForm1.Button1Click(Sender: TObject); var region1, region2 : hrgn; begin region1 := CreateRectRgn(0,0,width,height); region2 := CreateEllipticRgn(30,30,200,200); ...