PartyPooper Posted February 1, 2010 Share Posted February 1, 2010 I have a two monitor system and I have a program that displays the GUI on the secondary monitor. When the program opens up an InputBox, it displays it on the primary monitor instead of the secondary monitor where the GUI is located. This is fast becoming a PITA. Is there any way to sticky the InputBox to the GUI? I thought by using the hwnd option of the InputBox and pointing it to the window handle of the parent ($hMainGUI) this would solve the problem but it doesn't. I've tried the following without success: Local $sInfo = InputBox("Display Information", "Enter Question(case insensitive):", "", "", 250, 110, -1, -1, "", $hMainGUI) Local $sInfo = InputBox("Display Information", "Enter Question(case insensitive):", "", "", 250, 110, 0, 0, "", $hMainGUI) Local $sInfo = InputBox("Display Information", "Enter Question(case insensitive):", "", "", 250, 110, "", "", "", $hMainGUI) Local $sInfo = InputBox("Display Information", "Enter Question(case insensitive):", "", "", 250, 110, Default, Default, "", $hMainGUI) Any ideas? Link to comment Share on other sites More sharing options...
PartyPooper Posted February 1, 2010 Author Share Posted February 1, 2010 I should point out the GUI is created in a separate function using: $hMainGUI = GUICreate($sProgramName, $iGUIWidth, $iGUIHeight, $iGUIXPos, $iGUIDYPos) Not sure if my lack of Styles and/or exStyles contribute to this problem. Link to comment Share on other sites More sharing options...
PartyPooper Posted February 2, 2010 Author Share Posted February 2, 2010 What happens if you create a second GUI that is child of the first? If it appears on the right monitor you could use it to make a custom InputBox.I could but it would mean a significant increase in coding which I want to avoid. If I can't find a solution to this, I may have to end up identifying the main GUIs coordinates and calculating a position from that. Means more coding but less than having to create custom input boxes and input checks.Thanks for the idea anyway. 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