[일반/컴포넌트] StringGrid 를 텍스트파일(csv)로 저장하고 불러오기
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids; type TForm1 = class(TForm) StringGrid1: TStringGrid; Button1: TButton; Button2: TButton; Opendialog1: TOpendialog; SaveDialog1: TSaveDialog; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private ..
[시스템] 실행중인 모든 프로세스의 "CPU 시간"/시작 시간 구하기
// 작업 관리자의 'CPU 시간' unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls, psapi; type TForm1 = class(TForm) ListBox1: TListBox; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function GetLocalTim..
[윈도우즈 API] 디렉토리나 파일의 속성(변경/생성/사용한 날짜, 특성) 바꾸기
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DateUtils; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} // Convert TDateTime to TFileTime. function DateTimeToFileTime(Dat..
[일반/컴포넌트] 다이얼로그 박스가 이미 떠있는지 검사하여 강제로 닫기
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Timer1: TTimer; procedure Button1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1..
[일반/컴포넌트] RichEdit 2.0 줄간격 조정
// RichEdit의 한글 폰트의 경우 줄간격이 좁은 경향이 있다. 아래는 이를 원하는 만큼 늘리는 방법이다 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, RichEdit; type TForm1 = class(TForm) RichEdit1: TRichEdit; Button1: TButton; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; i..