ioa747 Posted yesterday at 01:02 PM Posted yesterday at 01:02 PM Is the behavior of _GUI2 logical ? Or is this just behaving strangely towards me? expandcollapse popup#include <GUIConstants.au3> Global $Exit1, $Exit2 _GUI1() _GUI2() ;********************************** While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Exit1, $Exit2 Exit EndSwitch WEnd ;********************************** ;---------------------------------------------------------------------------------------- Func _GUI1() Local $hGUI = GUICreate("Example Gui 1", 390, 320, @DesktopWidth * 0.7, -1, $WS_POPUPWINDOW) ;~ GUISetStyle(-1, $WS_POPUPWINDOW) GUISetBkColor(0x0D1117) Local $ShippingDetails = GUICtrlCreateLabel("Example Gui 1", 10, 5, 380, 30, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFD800) $Exit1 = GUICtrlCreateButton("EXIT", 20, 270, 95, 40) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0D1117) GUICtrlSetBkColor(-1, 0xFFD800) GUISetState(@SW_SHOW) EndFunc ;==>_GUI1 ;---------------------------------------------------------------------------------------- Func _GUI2() Local $hGUI = GUICreate("Example Gui 2", 390, 320, @DesktopWidth * 0.3, -1) GUISetStyle(-1, $WS_POPUPWINDOW) GUISetBkColor(0x0D1117) Local $ShippingDetails = GUICtrlCreateLabel("Example Gui 2", 10, 5, 380, 30, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFD800) $Exit2 = GUICtrlCreateButton("EXIT", 20, 270, 95, 40) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x0D1117) GUICtrlSetBkColor(-1, 0xFFD800) GUISetState(@SW_SHOW) EndFunc ;==>_GUI2  I know that I know nothing
argumentum Posted yesterday at 01:55 PM Posted yesterday at 01:55 PM ..crazy, and I can't imagine the reason  Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Solution pixelsearch Posted yesterday at 02:04 PM Solution Posted yesterday at 02:04 PM What means -1 as 1st parameter of GuiSetStyle() ? "I think you are searching a bug where there is no bug... don't listen to bad advice."
argumentum Posted yesterday at 02:06 PM Posted yesterday at 02:06 PM Func _GUI2() Local $hGUI = GUICreate("Example Gui 2", 390, 320, @DesktopWidth * 0.3, -1) GUISetStyle($WS_POPUPWINDOW) ; <====== ..you scared me there for a minute 😅 pixelsearch and ioa747 1 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted yesterday at 02:12 PM Posted yesterday at 02:12 PM According to Koda it should be GUISetStyle(BitOR($WS_SYSMENU,$WS_POPUP)) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
pixelsearch Posted yesterday at 02:13 PM Posted yesterday at 02:13 PM (edited) Gui 1 (Control Viewer) Style 0x94880000 WS_POPUP, WS_VISIBLE, WS_CLIPSIBLINGS, WS_BORDER, WS_SYSMENU ExStyle 0 ================= For GUI2, the wrong syntax GUISetStyle(-1, $WS_POPUPWINDOW) messed up its ex style : Gui 2 (GuiPropView) Style 0x94CA0000 (unchanged, style kept as when GUI2 was created) ExStyle 0x00080100 <= this is 0x80000 (WS_EX_LAYERED) that's why we couldn't see GUI2 + 0x100 (WS_EX_WINDOWEDGE) Â Edited yesterday at 03:01 PM by pixelsearch explanations ioa747 1 "I think you are searching a bug where there is no bug... don't listen to bad advice."
pixelsearch Posted yesterday at 02:20 PM Posted yesterday at 02:20 PM From "GUIStyles.inc.au3" [0x80880000, 'WS_POPUPWINDOW'] [0x80000000, 'WS_POPUP'] [0x00800000, 'WS_BORDER'] [0x00080000, 'WS_SYSMENU'] Great how these 8's are vertically aligned argumentum 1 "I think you are searching a bug where there is no bug... don't listen to bad advice."
ioa747 Posted yesterday at 02:31 PM Author Posted yesterday at 02:31 PM GUISetStyle ( Style [, ExStyle [, winhandle]] ) oops, my mind didn't go there. first I did a reboot maybe ... and then I started cursing Microsoft Thank you very much. pixelsearch 1 I know that I know nothing
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