pascalscript/Samples/Import/dlltest.rops
carlokok afe3fdfd77 re-checkin
git-svn-id: http://code.remobjects.com/svn/pascalscript@1 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2006-05-30 14:23:25 +00:00

20 lines
876 B
Plaintext

Program IFSTest;
// compile the demo application, minimize delphi and run this.
function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall';
function ShowWindow(hWnd, nCmdShow: Longint): Integer; external 'ShowWindow@user32.dll stdcall';
function SetWindowText(hWnd: Longint; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
var
i: Longint;
wnd: Longint;
Begin
wnd := Findwindow('', 'Innerfuse Pascal Script III');
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 200000 do begin end;
ShowWindow(Wnd, 0); // hide it
for i := 0 to 200000 do begin end;
SetWindowText(Wnd, 'Wasn''t that nice?');
ShowWindow(Wnd, 5); // show it
for i := 0 to 200000 do begin end;
SetWindowText(Wnd, 'Innerfuse Pascal Script III');
End.