분류 전체보기 (86) 썸네일형 리스트형 [일반/컴포넌트] Memo의 입력행수 제한하기 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; procedure Memo1Change(Sender: TObject); procedure Memo1KeyPress(Sender: TObject; var Key: Char); private { Private declarations } public { Public declarations } end; const MAX_LINES = 5; // 최대 입력행수 var Form1: TForm1; implementation {$R *.DFM} pro.. [윈도우즈 API] 윈도우즈의 기본 폴더들의 실제 디렉토리 // 아래 소스는 모든 윈도우즈 기본 폰더들의 실제 디렉토리를 읽어오는 // 예제이지만 SHGetSpecialFolderLocation() 를 사용하시면 개별적으로 // 읽어올 수 있습니다 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Registry, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; va.. [시스템] BIOS 함수를 사용한 drive 접근방법 >Absolute sector read function calls are what I'm looking for. The relevant BIOS function is int 13, function 2. The following function will read the requested sector: type TSectorBuffer = array[0..511] of Byte; procedure ReadASector(Drive: Byte; Cylinder: Word; Head, Sector: Byte; var Buffer: TSectorBuffer); assembler; asm mov ax,Cylinder and ax,$0300 mov cl,2 shr ax,cl mov cl,al mov al,Sector .. [윈도우즈 API] TreeView의 hint popup 없애기 // TreeView의 특정 node가 전체 TreeView의 크기축소로 인하여 // 전부 나타나지 않을때 TreeView 는 자동으로 가려진 node를 hint 로 표시합니다 // 아래는 자동으로 나타나는 hint를 방지하는 소스입니다 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls; type TForm1 = class(TForm) Button1: TButton; TreeView1: TTreeView; procedure Button1Click(Sender: TObject); private { Private declarations } pub.. [시스템] Time Zone 정보를 시분으로 읽어오기 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; const // 아래 상수는 windows.pas 에 선언되어 있지 않음 TIME_ZONE_ID_UNKNOWN = 0; TIME_ZONE_ID_STANDARD = 1; TIME_ZONE_ID_DAYLIGHT = 2; var Form1: .. [시스템] CPU 종류 구하기 unit CpuId; interface type TCpuType = (cpu8086, cpu80286, cpu386, cpu486, cpuPentium); { Return the type of the current CPU } function CpuType: TCpuType; { Return the type as a short string } function CpuTypeString: String; implementation uses SysUtils; function CpuType: TCpuType; assembler; asm push DS { First check for an 8086 CPU } { Bits 12-15 of the FLAGS register are always set on the } { .. [윈도우즈 API] 윈도우즈 Telnet 으로 호스트 접속하기 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.Button1Click(Sender: TObject); var cCmd: array [0..1023] of char; HOST.. [시스템] 일정시간 경과후 없어지는 MessageBox unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TMboxThread = class(TThread) private { private declarations } protected procedure Execute; override; public constructor Create; end; TForm1 = class(TForm) Button1: TButton; Timer1: TTimer; procedure Button1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); pr.. [윈도우즈 API] 바탕화면, 시작메뉴 icon 숨기기 unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sen.. [시스템] 일정시간 경과후 없어지는 MessageBox unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TMboxThread = class(TThread) private { private declarations } protected procedure Execute; override; public constructor Create; end; TForm1 = class(TForm) Button1: TButton; Timer1: TTimer; procedure Button1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); pr.. 이전 1 2 3 4 5 6 7 8 9 다음