#RequireAdmin #include #include #include #include #include ;~ Global $Label2 Global $Button2 = 9999 ; Need to set a placeholder value or it fires immediately Global $Button3 = 9999 Global $Label2 = 0, $Label3 = 0, $Label4 = 0 $Form1 = GUICreate("Form1", 530, 453, 713, 371) $Label1 = GUICtrlCreateLabel(@CRLF & @CRLF & "Application 1", 48, 24, 191, 144, $SS_CENTER) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xFFFF00) GUI2() ; From Application 2 $FixedLable = GUICtrlCreateLabel(@CRLF & @CRLF & @CRLF & "Fixed label", 40, 224, 436, 196, $SS_CENTER) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0x008000) GUICtrlSetState(-1, $GUI_DISABLE) ; Need to disable label if you want the overlapping button to work GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Label2 GUICtrlSetState($FixedLable, $GUI_HIDE) ; Hide $FixedLable APP2() Case $Button2 ; place Button 2 Case here GUICtrlSetState($Label4, $GUI_HIDE) GUICtrlSetState($Button2, $GUI_HIDE) Case $Button3 GUICtrlSetState($Button2, $GUI_HIDE) GUICtrlSetState($Label4, $GUI_SHOW) MsgBox(0, '', 'Button 3 Pressed') GUICtrlSetState($Button2, $GUI_SHOW) EndSwitch WEnd