VISTA BETA 2- ShowWindow
VISTA BETA 2- ShowWindow
SW_SHOWMAXIMIZED = 3
ShowWindow(hWnd,3)
System hangs.
SW_RESTORE = 9
Works.
Regards
Otto
ShowWindow(hWnd,3)
System hangs.
SW_RESTORE = 9
Works.
Regards
Otto
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
This code is properly working on Vista Beta 2 (5384):
MAXIMIZED uses ShowWindow(). Please provide a self contained sample to reproduce the error that you mention, thanks.
This code is properly working on Vista Beta 2 (5384):
Code: Select all
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Test for Otto"
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
Here is my code.
Regards
Otto
func ziRechnung
LOCAL cHSTIni := ".\INI\WINHOTEL.INI"
LOCAL WIN_HOT_VER := ""
LOCAL nPos := ""
LOCAL hWnd := GetWindow( GetActiveWindow(), GHW_HWNDFIRST )
LOCAL cTask :=""
LOCAL ktowahlaufruf := 0
local cTest :=""
*--------------------------------------------
WIN_HOT_VER := GetPvProfString( "SETUPDATEN","VerzeichnisWinHotel" , "C:\WINHOT96" ,cHSTIni )
nPos := len(WIN_HOT_VER+"WHRG.EXE")
// cTest := UPPER(left(cTask,nPos))
// msginfo( cTest )
while hWnd != 0
cTask = GetModuleFileName( GetWindowWord( hWnd, GWW_HINSTANCE ) )
// msginfo( cTask )
if UPPER(left(cTask,nPos)) = UPPER(WIN_HOT_VER + "WHRG.EXE")
//msginfo("Vor show 9" + UPPER(left(cTask,nPos)))
ShowWindow(hWnd,9)
setFocus(hWnd)
SETFOREGRO(hWnd)
RETURN NIL
endif
hWnd = GetWindow( hWnd, GHW_HWNDNEXT )
end
winexec("WHRG.exe")
RETURN NIL
Regards
Otto
func ziRechnung
LOCAL cHSTIni := ".\INI\WINHOTEL.INI"
LOCAL WIN_HOT_VER := ""
LOCAL nPos := ""
LOCAL hWnd := GetWindow( GetActiveWindow(), GHW_HWNDFIRST )
LOCAL cTask :=""
LOCAL ktowahlaufruf := 0
local cTest :=""
*--------------------------------------------
WIN_HOT_VER := GetPvProfString( "SETUPDATEN","VerzeichnisWinHotel" , "C:\WINHOT96" ,cHSTIni )
nPos := len(WIN_HOT_VER+"WHRG.EXE")
// cTest := UPPER(left(cTask,nPos))
// msginfo( cTest )
while hWnd != 0
cTask = GetModuleFileName( GetWindowWord( hWnd, GWW_HINSTANCE ) )
// msginfo( cTask )
if UPPER(left(cTask,nPos)) = UPPER(WIN_HOT_VER + "WHRG.EXE")
//msginfo("Vor show 9" + UPPER(left(cTask,nPos)))
ShowWindow(hWnd,9)
setFocus(hWnd)
SETFOREGRO(hWnd)
RETURN NIL
endif
hWnd = GetWindow( hWnd, GHW_HWNDNEXT )
end
winexec("WHRG.exe")
RETURN NIL
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Badara Thiam
- Posts: 160
- Joined: Tue Oct 18, 2005 10:21 am
- Location: France
- Contact:
- Badara Thiam
- Posts: 160
- Joined: Tue Oct 18, 2005 10:21 am
- Location: France
- Contact:
I have revisited my Windows 2000 API SuperBible,
and it's appear than "ShowWindow does not make sure the window is in the foreground. Use SetWindowPos or SetActiveWindow function to bring a window to the foreground."
Also, there is LockSetForegroundWindow function who
"...disable or enables the calls to the SetForegroundWindow
function for the calling process.
By default, the system automatically enables calls to SetForegroundWindow if the user press the Alt key or takes some
action that causes the system itself to change the foreground window.
This function allows applications to prevent other applications from
making a foreground change that can interrupt its interaction with the user."
Hope this help
and it's appear than "ShowWindow does not make sure the window is in the foreground. Use SetWindowPos or SetActiveWindow function to bring a window to the foreground."
Also, there is LockSetForegroundWindow function who
"...disable or enables the calls to the SetForegroundWindow
function for the calling process.
By default, the system automatically enables calls to SetForegroundWindow if the user press the Alt key or takes some
action that causes the system itself to change the foreground window.
This function allows applications to prevent other applications from
making a foreground change that can interrupt its interaction with the user."
Hope this help
Badara Thiam
http://www.icim.fr
http://www.icim.fr