home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 December
/
Chip_2001-12_cd1.bin
/
zkuste
/
delphi
/
kompon
/
d23456
/
CAJSCRTP.ZIP
/
demo_del
/
dll2.ifs
< prev
next >
Wrap
Text File
|
2001-06-11
|
892b
|
22 lines
Program IFSTest;
// compile the demo application, minimize delphi and run this.
const
user32 = 'user32.dll';
function FindWindow(C1, C2: PChar): Longint; external user32 name 'FindWindowA'; StdCall;
function ShowWindow(hWnd, nCmdShow: Longint): Integer; external user32 name 'ShowWindow'; stdcall;
function SetWindowText(hWnd: Longint; Text: PChar): Longint; external user32 name 'SetWindowTextA'; stdcall;
var
i, i2: Longint;
wnd: Longint;
Begin
wnd := Findwindow('', 'Demo');
SetWindowText(Wnd, 'This is DLL demo, it calls some windows user32 routines. This will hide this window for a few seconds');
for i := 0 to 100000 do begin end;
ShowWindow(Wnd, 0); // hide it
for i := 0 to 100000 do begin end;
SetWindowText(Wnd, 'Wasn''t that nice?');
ShowWindow(Wnd, 5); // show it
for i := 0 to 100000 do begin end;
SetWindowText(Wnd, 'Demo');
End.