Page 1 of 1

SETFOREGRO

PostPosted: Wed Jul 26, 2006 5:32 pm
by Otto
Link error.
Which lib do I have to use?

Thanks in advance
Otto

Re: SETFOREGRO

PostPosted: Wed Jul 26, 2006 8:10 pm
by Enrico Maria Giordano
Try this:

Code: Select all  Expand view
DLL32 FUNCTION SETFOREGROUNDWINDOW( hWnd AS LONG ) AS BOOL;
      PASCAL FROM "SetForegroundWindow" LIB "user32.dll"


EMG

PostPosted: Thu Jul 27, 2006 6:44 am
by Otto
Thank you.
ShowWindow(hWnd,9)
setFocus(hWnd)
SETFOREGRO(hWnd)
This works fine but not with VISTA.
If the WINDOW is MINIMIZED ShowWindow(hWnd,9) does not work.
Regards
Otto

PostPosted: Thu Jul 27, 2006 6:48 am
by Enrico Maria Giordano
It seems a bug in Windows Vista. It is Microsoft responsibility to correctly implement their Windows API. :-)

EMG

PostPosted: Thu Jul 27, 2006 6:23 pm
by Otto
Thank you Enrico,
sure you are right - but no one would to believe us.

Regards
Otto

PostPosted: Thu Jul 27, 2006 6:35 pm
by Antonio Linares
Otto,

If you provide a reduced and self contained PRG sample, then we will be able to quickly compile it and test it and offer you a solution for it. Thanks,

PostPosted: Thu Jul 27, 2006 8:15 pm
by Otto