home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / delphi / kompon / d456 / CAJSCRPT.ZIP / ifps3 / demo / dlltest.ifps3 < prev    next >
Text File  |  2002-04-18  |  895b  |  20 lines

  1. Program IFSTest;
  2. // compile the demo application, minimize delphi and run this. 
  3. function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall';
  4. function ShowWindow(hWnd, nCmdShow: Longint): Integer; external 'ShowWindow@user32.dll stdcall';
  5. function SetWindowText(hWnd: Longint; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
  6. var 
  7.   i: Longint;
  8.   wnd: Longint;
  9. Begin
  10.   wnd := Findwindow('', 'Innerfuse Pascal Script III');
  11.   SetWindowText(Wnd, 'This is DLL demo, it calls some windows user32 routines. This will hide this window for a few seconds');
  12.   for i := 0 to 200000 do begin end;
  13.   ShowWindow(Wnd, 0); // hide it
  14.   for i := 0 to 200000 do begin end;
  15.   SetWindowText(Wnd, 'Wasn''t that nice?');
  16.   ShowWindow(Wnd, 5); // show it
  17.   for i := 0 to 200000 do begin end;
  18.   SetWindowText(Wnd, 'Innerfuse Pascal Script III');
  19. End.
  20.