Is there a way to get the Window Handle (Hwnd) of Modules and DBs? |
Re: Get the Window Handle |
Re: Get the Window Handle OurGuest - Thu Oct 06 14:14:15 EDT 2011 What are you trying to do? Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Get the Window Handle Mathias Mamsch - Fri Oct 07 16:27:01 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS If you did go this route perhaps the following sample code would make things easier.
// sample code, HWND offsets are unknown to this author
string c_Vers = doorsInfo(infoVersion)
int c_HWND_Window_Offset = 0
elseif(c_Vers[0] == '7') c_HWND_Window_Offset = 4
elseif(c_Vers[0] == '8') c_HWND_Window_Offset = 4
elseif(c_Vers[0:2] == "9.0") c_HWND_Window_Offset = 4
elseif(c_Vers[0:2] == "9.1") c_HWND_Window_Offset = 5
elseif(c_Vers == "9.2.0.1") c_HWND_Window_Offset = 5
elseif(c_Vers == "9.2.0.2") c_HWND_Window_Offset = 5
elseif(c_Vers == "9.2.0.3") c_HWND_Window_Offset = 6
elseif(c_Vers == "9.2.0.4") c_HWND_Window_Offset = 6
elseif(c_Vers[0:2] == "9.3") c_HWND_Window_Offset = 6
else c_HWND_Window_Offset = 6 // future offsets?
int GetHwndHandle(DB in_db)
{ get addr_, extract addr_ + c_HWND_Window_Offset
return(whatever)
}
|
Re: Get the Window Handle Mathias Mamsch - Fri Oct 07 16:27:01 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS I guess another way would be to somehow make my new window "Always on top" too, but no luck on doing that yet. |
Re: Get the Window Handle SystemAdmin - Mon Oct 10 05:08:53 EDT 2011
If you just want to bring the window to the front you could try the following: -
OleAutoObj shell = oleCreateAutoObject("WScript.shell")
OleAutoArgs shellArgs = create
put(shellArgs, "Window Title (only need first part of it)")
oleMethod(shell, "AppActivate", shellArgs)
clear(shellArgs)
oleCloseAutoObject(shell)
shell=null
|