// compile the demo application, minimize delphi and run this.
var
i, i2: Longint;
wnd: Longint;
Lib: ResourcePointer;
Begin
if not LoadLibrary('user32.dll', Lib) then begin writeln('Failed');exit;end;
if not MapLibraryProc(Lib, 'FindWindowA', 'function FindWindow(C1, C2: PChar): Longint; stdcall;') then begin writeln('Failed');exit;end;
if not MapLibraryProc(Lib, 'ShowWindow', 'function ShowWindow(hWnd, nCmdShow: Longint): Integer; stdcall;') then begin writeln('Failed');exit;end;
if not MapLibraryProc(Lib, 'SetWindowTextA', 'function SetWindowText(hWnd: Longint; Text: PChar): Longint; stdcall;') then begin writeln('Failed');exit;end;
for i := 0 to 10000 do begin end;
wnd := Findwindow('', 'Demo');
SetWindowText(Wnd, 'Do you know what flashing windows are?');
for i := 0 to 40000 do begin end;
SetWindowText(Wnd, 'Are you certain about that?');