TheAutomator Posted February 2, 2015 Author Posted February 2, 2015 Melba23, its stays open for if you want to click it a second time. did you maximize the child window and then restored it? On my computer that seems to be a problem, i wish i could show you this is a more direct way.. here are some screenshots i made: https://drive.google.com/file/d/0B6ErMbcSk-fWemJ2R1lnOHRUUUk/view?usp=sharing https://drive.google.com/file/d/0B6ErMbcSk-fWYnlsaWJZNE5lRHc/view?usp=sharing https://drive.google.com/file/d/0B6ErMbcSk-fWUGp1M25abTFvMWM/view?usp=sharing https://drive.google.com/file/d/0B6ErMbcSk-fWNl9XMU5jZXBxY00/view?usp=sharing TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
Moderators Melba23 Posted February 2, 2015 Moderators Posted February 2, 2015 TheAutomator,I see it. I do not use background images in my GUIs - they cause too many problems, as you are discovering. So I cannot really help any more - sorry. 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
TheAutomator Posted February 2, 2015 Author Posted February 2, 2015 That's ok Melba23 . You already helped me a lot the last few days . Thanks and regards TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
pixelsearch Posted October 4, 2020 Posted October 4, 2020 (edited) On 2/2/2015 at 5:02 PM, Melba23 said: TheAutomator, I see it. I do not use background images in my GUIs - they cause too many problems, as you are discovering. So I cannot really help any more - sorry. M23 Hi Melba23 & TheAutomator I just read the long discussion between both of you in this old thread and resurrected it because a simple solution seems to work, it could be helpful for anyone facing the same situation. Based on the last script posted by TheAutomator (at the very bottom of the precedent page), I added the $WS_EX_COMPOSITED extended style to the parent window and it seems to solve the issues described above by TheAutomator Please remember to place a pic (named test.jpg) inside the same folder than the script, it will be the parent GUI background image. expandcollapse popup#include <EditConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinApi.au3> $SCREEN = GUICreate('TEST FORM 1', 600, 400, -1, -1, -1, $WS_EX_COMPOSITED) GUISetBkColor(0x000000) $IMAGE = GUICtrlCreatePic('test.jpg', 0, 0, 600, 370) GUICtrlSetState(-1, $GUI_DISABLE) $NEW = GUICtrlCreateButton('NEW', 0, 370, 60, 30) GUICtrlSetCursor(-1, 0) $LST = GUICtrlCreateList('NEW FORM', 0, 190, 120, 200, $WS_BORDER) GUICtrlSetData(-1, 'EXIT') GUICtrlSetFont(-1, 8, 400, 0, 'System') GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetState(-1, $GUI_HIDE) $INP = GUICtrlCreateInput('TESTING...', 460, 372, 100, 28, BitOR($ES_CENTER, $ES_UPPERCASE, $ES_READONLY)) GUICtrlSetFont(-1, 12, 400, 0, 'MS Sans Serif') GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetCursor (-1, 2) GUISetState(@SW_SHOW) While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $NEW If BitAND(GUICtrlGetState($LST), $GUI_HIDE) = $GUI_HIDE Then GUICtrlSetState($LST, $GUI_SHOW + $GUI_ONTOP) Else GUICtrlSetState($LST, $GUI_HIDE) EndIf Case $LST Switch GUICtrlRead($LST) Case 'EXIT' Exit Case 'NEW FORM' GUICtrlSetState($LST, $GUI_HIDE) $hNew_Child = GUICreate("Child", 300, 300, 10, 0, $WS_OVERLAPPEDWINDOW, -1, $SCREEN) GUICtrlCreateCheckbox('Filler 1', 10, 10, 120, 25) _WinAPI_SetParent($hNew_Child, $screen) GUISetState() EndSwitch EndSwitch WEnd Some additional changes : * Clicking the "New" button displays the list on top (added ...+ $GUI_ONTOP) * Clicking 'NEW FORM' in the list hides the list (leaving the New button always visible, as requested by OP) * Child window style changed to $WS_OVERLAPPEDWINDOW, which contains all we need. Edited October 4, 2020 by pixelsearch description of additional changes "I think you are searching a bug where there is no bug... don't listen to bad advice."
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