Holger Posted June 30, 2004 Share Posted June 30, 2004 So I don't know if anybody read this, so here are some deatils:http://www.autoitscript.com/forum/index.php?showtopic=3447The Problem is that the GUI doesn't get the focus 'right'.So I tested it with the changing of the lines in the Show()-function of the GUI-part to this:// we need to show the GUI SetForegroundWindow(m_hWndGUI); ShowWindow(m_hWndGUI, SW_SHOW);What I found in the guibox.cpp was confusing me:// we need to show the GUI ShowWindow(m_hWndGUI, SW_SHOW); ShowWindow(m_hWndGUI, SW_SHOW);So maybe there was overwritten a command!?But I tested it with the changed lines and the GUI now also has the focus on the taskbar...What do you think? Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Administrators Jon Posted June 30, 2004 Administrators Share Posted June 30, 2004 The main autoit window is minimized and hidden and this seems to be causing some strangeness (the GUI is a child window). I've just tried this and it seems to work: SetForegroundWindow(m_hWndGUI); // Seems to make the taskbar entry for the GUI active ShowWindow(m_hWndGUI, SW_SHOW); // Show the window g_oSetForeWinEx.Activate(m_hWndGUI); // After showing the GUI WinActive() to make sure it is active SetForegroundWindow() is unreliable under 2000/XP so the WinActivate() version is used. The double ShowWindow() lines were just a previous attempt to fix the problem based on some notes in the ShowWindow docs (the first call may be ignored) - but it didn't work. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now