AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Modal InputBox?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Donny Bahama



Joined: 30 Dec 2006
Posts: 132
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA

PostPosted: Sun Apr 19, 2009 7:07 pm    Post subject: Modal InputBox? Reply with quote

Was doing a wife-beta and she accidentally clicked the GUI behind the InputBox. This caused the GUI to come to the top and the InputBox to disappear, which confused her greatly. Worse, this is a Windows Mobile script using AHKCE, so switching to the InputBox via the task bar button isn't an option.

In the docs, there's nothing about making an InputBox modal.
Any suggestions on how to accomplish this?
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Apr 19, 2009 8:42 pm    Post subject: Reply with quote

Create your own InputBox using ...
Code:
Gui, +AlwaysOnTop
Gui, Add, Edit, ...
Gui, Add, Button, ...
Gui, Show,, Test
Return
Back to top
[VxE]



Joined: 07 Oct 2006
Posts: 3254
Location: Simi Valley, CA

PostPosted: Sun Apr 19, 2009 9:20 pm    Post subject: Reply with quote

It may help to disable the gui while a dialogue is open.

If you want to get into some advanced stuff, you can use SetParent() via dllcall. Making the inputbox window a child of the main gui window should keep it on top.
_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!
Back to top
View user's profile Send private message
yunhen3350



Joined: 17 Apr 2009
Posts: 20

PostPosted: Mon Apr 20, 2009 1:24 am    Post subject: Reply with quote

easy, just add "Gui, +OwnDialogs" before input box

Code:
Gui, Add, Button, , TryMe
Gui, Show, w800 h600
Return

ButtonTryMe:
{
   Gui, +OwnDialogs ;Add This line just before input box
   InputBox, var, , This Input Box is in modal mode
   MsgBox, U'd Enter `"%var%`"
}
Return
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group