SETFOREGRO

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

SETFOREGRO

Post by Otto »

Link error.
Which lib do I have to use?

Thanks in advance
Otto
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: SETFOREGRO

Post by Enrico Maria Giordano »

Try this:

Code: Select all

DLL32 FUNCTION SETFOREGROUNDWINDOW( hWnd AS LONG ) AS BOOL;
      PASCAL FROM "SetForegroundWindow" LIB "user32.dll"
EMG
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

It seems a bug in Windows Vista. It is Microsoft responsibility to correctly implement their Windows API. :-)

EMG
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Thank you Enrico,
sure you are right - but no one would to believe us.

Regards
Otto
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Post Reply