Remove um diretório

Remove um diretório procedure Deltree( cPath: string ); var search: TSearchRec; nFiles: integer; begin nFiles:=FindFirst( cPath + ‘*.*’, faAnyFile, search ); while nFiles=0 do begin if Search.Attr = faDirectory then begin if (Search.Name<>’.’) and (Search.Name<>’..’) then begin Deltree( cPath + ‘\’ + Search.Name ); RMDir( cPath + ‘\’ + Search.Name ); end; end else begin

Continuar lendo »

Escreve na diagonal

Procedure que escreve na diagonal em Delphi Procedure Diagonal(FName: String;Fsize, Pos, Land:Integer; Fcor:TColor;Texto: String); var lf : TLogFont; tf : TFont; begin with Form1.Canvas do begin Brush.Style := bsClear; Font.Name := FName; Font.Size := Fsize; Font.Color := Fcor; tf := TFont.Create; tf.Assign(Font); GetObject(tf.Handle, sizeof(lf), @lf); lf.lfEscapement := Pos; lf.lfOrientation := Land; lf.lfQuality := 1; tf.Handle

Continuar lendo »