motionman95 Posted May 24, 2010 Share Posted May 24, 2010 I have two forms - one is the main form, and another is the settings dialog. I want to be able to easily open the settings form and keep the main form inaccessible while the settings form is open. Thanks in advance! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 24, 2010 Moderators Share Posted May 24, 2010 motionman95, And what have you tried yourself so far? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted May 24, 2010 Author Share Posted May 24, 2010 motionman95,And what have you tried yourself so far? M23You don't wanna know - I had to get a new computer because of it. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 24, 2010 Moderators Share Posted May 24, 2010 motionman95, I had to get a new computer because of itI find that rather hard to believe..... But to give you a clue: expandcollapse popup#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("Settings", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton Settings() EndSwitch WEnd Func Settings() GUISetState(@SW_DISABLE, $HGUI) $hSettings_GUI = GUICreate("Settings", 200, 200) $hExit = GUICtrlCreateButton("Exit", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $hExit GUISetState(@SW_ENABLE, $hGUI) GUIDelete($hSettings_GUI) Return EndSwitch WEnd EndFunc That should do what you want and not destroy anything..... M23 P.S. When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted May 24, 2010 Author Share Posted May 24, 2010 Ha ha ha. And actually I did have to get a new computer - apparently I used a script I found on the net that did something exactly opposite of what I wanted... I have a button and everything already, just figuring out how to set up the forms like in other applications - you run the app, click on the settings button, and whenever you try to click on the main form the settings forum blinks twice, and you can't access the main form until you close the settings dialog... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 24, 2010 Moderators Share Posted May 24, 2010 motionman95, The settings form now flashes twice if you click on the main form: expandcollapse popup#include <GUIConstantsEx.au3> #include <WinAPI.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("Settings", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton Settings() EndSwitch WEnd Func Settings() GUISetState(@SW_DISABLE, $hGUI) $hSettings_GUI = GUICreate("Settings", 100, 100) $hExit = GUICtrlCreateButton("Exit", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $hExit GUISetState(@SW_ENABLE, $hGUI) GUIDelete($hSettings_GUI) Return Case $GUI_EVENT_PRIMARYDOWN $aMousePos = MouseGetPos() Local $TPoint = DllStructCreate($tagPoint) DllStructSetData($TPoint, "x", MouseGetPos(0)) DllStructSetData($TPoint, "y", MouseGetPos(1)) If _WinAPI_WindowFromPoint($TPoint) = $hGUI Then For $i = 1 To 4 _WinAPI_FlashWindow($hSettings_GUI) Sleep(100) Next EndIf EndSwitch WEnd EndFunc M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted May 24, 2010 Author Share Posted May 24, 2010 (edited) Wowzers. OK, I'll take a look at that. Thanks!!!EDIT:Is there a way to remove the Settings form from the task bar? Edited May 24, 2010 by motionman95 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 24, 2010 Moderators Share Posted May 24, 2010 motionman95, You want fries with that? $hSettings_GUI = GUICreate("Settings", 100, 100, Default, Default, -1, -1, $hGUI) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted May 24, 2010 Author Share Posted May 24, 2010 motionman95,You want fries with that? M23Yes please! xD Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 24, 2010 Moderators Share Posted May 24, 2010 motionman95, Then go buy them yourself! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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