Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Modal InputBox?

  • Please log in to reply
3 replies to this topic
Donny Bahama
  • Members
  • 132 posts
  • Last active: May 05 2009 07:01 PM
  • Joined: 30 Dec 2006
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?

  • Guests
  • Last active:
  • Joined: --
Create your own InputBox using ...
Gui, +AlwaysOnTop
Gui, Add, Edit, ...
Gui, Add, Button, ...
Gui, Show,, Test

  • Moderators
  • 3622 posts
  • Last active: Dec 24 2015 02:21 AM
  • Joined: 07 Oct 2006
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.

  • Members
  • 20 posts
  • Last active: May 18 2009 03:04 AM
  • Joined: 17 Apr 2009
easy, just add "Gui, +OwnDialogs" before input box

Gui, Add, Button, , TryMe
Gui, Show, w800 h600

	Gui, +OwnDialogs ;Add This line just before input box
	InputBox, var, , This Input Box is in modal mode
	MsgBox, U'd Enter `"%var%`"