Quantcast
Channel: YS-Soft Labs » Delphi
Browsing latest articles
Browse All 5 View Live

Mengetahui jika form adalah “modal”

procedure TForm1.Button1Click(Sender: TObject); begin if (fsModal in FormState) then ShowMessage(’Form is modal.’); end;

View Article


Sembunyikan tombol minimize/maximize pada form

procedure TForm1.FormCreate(Sender: TObject); var l: DWORD; begin l := GetWindowLong(Self.Handle, GWL_STYLE); l := l and not (WS_MINIMIZEBOX); l := l and not (WS_MAXIMIZEBOX); l :=...

View Article


Membalik string/kalimat (Reverse String)

function ReverseString(const s: string): string; var i, len: Integer; begin len := Length(s); SetLength(Result, len); for i := len downto 1 do begin Result[len - i + 1] := s[i]; end; end;

View Article

Mengubah atribut properties File

procedure TForm1.Button1Click(Sender: TObject); begin with OpenDialog1 do if Execute then if SetFileAttributes(PChar(Filename), FILE_ATTRIBUTE_HIDDEN) then Caption:=’attribute was changed’ else...

View Article

Mengatur tanggal/waktu suatu file

procedure TForm1.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then Edit1.Text:=OpenDialog1.FileName; end; procedure TForm1.Button2Click(Sender: TObject); var HFile: Word; MyDate:...

View Article

Browsing latest articles
Browse All 5 View Live