Jump to content

Search the Community

Showing results for tags 'hover'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 6 results

  1. ; https://www.autoitscript.com/forum/topic/211986-creates-a-rectangle-frame/ ;---------------------------------------------------------------------------------------- ; Title...........: _GuiFrame.au3 ; Description.....: Creates a rectangle frame ; AutoIt Version..: 3.3.16.1 Author: ioa747 ; Note............: Testet in Win10 22H2 ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <WindowsConstants.au3> #include <WinAPIGdi.au3> ;Example: Global $aCoord, $hPoint, $hFrame = _GuiFrame("", 100, 100, 200, 200, 5, 0xFFFFFF, 255) ;********************************** Do $aCoord = PixelSearch(100, 100, 200, 200, 0xFFFFFF, 0, 1, 0) ;0xFFFFFF White If Not @error Then ConsoleWrite("found White at X,Y: " & $aCoord[0] & "," & $aCoord[1] & @CRLF) $hPoint = _GuiFrame("", $aCoord[0], $aCoord[1], $aCoord[0] + 1, $aCoord[1] + 1, 3, 0xFF0000) Sleep(4000) GUIDelete($hPoint) EndIf Sleep(10) Until GUIGetMsg() = -3 ; GUI_EVENT_CLOSE ;********************************** ; #FUNCTION# -------------------------------------------------------------------------------------------------------------------- ; Name...........: _GuiFrame ; Description....: Creates a rectangle frame ; Syntax.........: _GuiFrame($sTitle, $iLeft, $iTop, $iRight, $iBottom [, $iThickness = 2 [, $iColor = 0xFF0000 [, $iTransparency = 150 [, $hWndParent = 0]]]]) ; Parameters.....: $sTitle - The title of frame. ; $iLeft - The left coordinate of frame. ; $iTop - The top coordinate of frame. ; $iRight - The right coordinate of frame. ; $iBottom - The bottom coordinate of frame. ; $iThickness - [optional] The thickness of frame (default = 1). ; $iColor - [optional] The color of frame (default = 0xFF0000). ; $iTransparency - [optional] The transparency of frame, in the range 1 - 255 (default = 150). ; $hWndParent - [optional] The parent window handle (default = 0). ; Return values..: The handle of the created frame. ; Author ........: ioa747 ; Notes .........: Note that coordinate, are the internal frame dimensions. ; Dependencies...: #include <WinAPIGdi.au3>, #include <WindowsConstants.au3> ;-------------------------------------------------------------------------------------------------------------------------------- Func _GuiFrame($sTitle, $iLeft, $iTop, $iRight, $iBottom, $iThickness = 1, $iColor = 0xFF0000, $iTransparency = 150, $hWndParent = 0) If $iThickness < 1 Or $iThickness = Default Then $iThickness = 1 If $iColor = -1 Or $iColor = Default Then $iColor = 0xFF0000 If $iTransparency < 1 Or $iTransparency = Default Or $iTransparency > 255 Then $iTransparency = 150 Local $iWidth = $iRight - $iLeft + (2 * $iThickness) + 1 Local $iHeight = $iBottom - $iTop + (2 * $iThickness) + 1 Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iLeft - $iThickness, $iTop - $iThickness, _ $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_NOACTIVATE), $hWndParent) GUISetBkColor($iColor, $hGUI) WinSetTrans($hGUI, "", $iTransparency) ;255 = Solid, 0 = Invisible. GUISetState(@SW_SHOWNOACTIVATE, $hGUI) Local $hOuter_rgn, $hInner_rgn, $hCombined_rgn $hOuter_rgn = _WinAPI_CreateRectRgn(0, 0, $iWidth, $iHeight) $hInner_rgn = _WinAPI_CreateRectRgn($iThickness, $iThickness, $iWidth - $iThickness, $iHeight - $iThickness) $hCombined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0) _WinAPI_CombineRgn($hCombined_rgn, $hOuter_rgn, $hInner_rgn, $RGN_DIFF) _WinAPI_DeleteObject($hInner_rgn) _WinAPI_SetWindowRgn($hGUI, $hCombined_rgn) Return $hGUI EndFunc ;==>_GuiFrame ;-------------------------------------------------------------------------------------------------------------------------------- Another example #include <WindowsConstants.au3> #include <WinAPIGdi.au3> #include <WinAPISys.au3> _Example1() Func _Example1() Local $iGuiFrame = _WinAPI_GetSystemMetrics($SM_CXDLGFRAME) Local $iThickness = 10 Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi! Move this window around'')"') Local $hWnd = WinWaitActive('Hello World!', '', 3) Local $aPos = WinGetPos($hWnd) Local $iLeft = $aPos[0] + $iGuiFrame Local $iTop = $aPos[1] Local $iRight = $aPos[0] + $aPos[2] - $iGuiFrame Local $iBottom = $aPos[1] + $aPos[3] - $iGuiFrame Local $hFrame = _GuiFrame("", $iLeft, $iTop, $iRight, $iBottom, $iThickness, 0xFF0000, 150, $hWnd) ConsoleWrite("$hFrame=" & $hFrame & @CRLF) Local $sStrPos While WinExists($hWnd) $aPos = WinGetPos($hWnd) If $sStrPos <> $aPos[0] & ";" & $aPos[1] Then WinMove($hFrame, '', $aPos[0] - $iThickness + $iGuiFrame, $aPos[1] - $iThickness) $sStrPos = $aPos[0] & ";" & $aPos[1] EndIf Sleep(10) WEnd EndFunc ;==>_Example1 ; #FUNCTION# -------------------------------------------------------------------------------------------------------------------- ; Name...........: _GuiFrame ; Description....: Creates a rectangle frame ; Syntax.........: _GuiFrame($sTitle, $iLeft, $iTop, $iRight, $iBottom [, $iThickness = 2 [, $iColor = 0xFF0000 [, $iTransparency = 150 [, $hWndParent = 0]]]]) ; Parameters.....: $sTitle - The title of frame. ; $iLeft - The left coordinate of frame. ; $iTop - The top coordinate of frame. ; $iRight - The right coordinate of frame. ; $iBottom - The bottom coordinate of frame. ; $iThickness - [optional] The thickness of frame (default = 1). ; $iColor - [optional] The color of frame (default = 0xFF0000). ; $iTransparency - [optional] The transparency of frame, in the range 1 - 255 (default = 150). ; $hWndParent - [optional] The parent window handle (default = 0). ; Return values..: The handle of the created frame. ; Author ........: ioa747 ; Notes .........: Note that coordinate, are the internal frame dimensions. ; Dependencies...: #include <WinAPIGdi.au3>, #include <WindowsConstants.au3> ;-------------------------------------------------------------------------------------------------------------------------------- Func _GuiFrame($sTitle, $iLeft, $iTop, $iRight, $iBottom, $iThickness = 1, $iColor = 0xFF0000, $iTransparency = 150, $hWndParent = 0) If $iThickness < 1 Or $iThickness = Default Then $iThickness = 1 If $iColor = -1 Or $iColor = Default Then $iColor = 0xFF0000 If $iTransparency < 1 Or $iTransparency = Default Or $iTransparency > 255 Then $iTransparency = 150 Local $iWidth = $iRight - $iLeft + (2 * $iThickness) + 1 Local $iHeight = $iBottom - $iTop + (2 * $iThickness) + 1 Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iLeft - $iThickness, $iTop - $iThickness, _ $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_NOACTIVATE), $hWndParent) GUISetBkColor($iColor, $hGUI) WinSetTrans($hGUI, "", $iTransparency) ;255 = Solid, 0 = Invisible. GUISetState(@SW_SHOWNOACTIVATE, $hGUI) Local $hOuter_rgn, $hInner_rgn, $hCombined_rgn $hOuter_rgn = _WinAPI_CreateRectRgn(0, 0, $iWidth, $iHeight) $hInner_rgn = _WinAPI_CreateRectRgn($iThickness, $iThickness, $iWidth - $iThickness, $iHeight - $iThickness) $hCombined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0) _WinAPI_CombineRgn($hCombined_rgn, $hOuter_rgn, $hInner_rgn, $RGN_DIFF) _WinAPI_DeleteObject($hInner_rgn) _WinAPI_SetWindowRgn($hGUI, $hCombined_rgn) Return $hGUI EndFunc ;==>_GuiFrame ;-------------------------------------------------------------------------------------------------------------------------------- Please, every comment is appreciated! leave your comments and experiences here! Thank you very much
  2. I'm using a graphic button in a form and I want to change it to another image when the cursor is hovered over the button. I've got that working but the button flickers constantly. Here's my script: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; create borderless, chromeless form into which image will be placed $Form1 = GUICreate("Welcome", 500, 500, -1, -1, BitOR($WS_SYSMENU,$WS_POPUP), 0) ; place image file in form $Pic1 = GUICtrlCreatePic("Welcometest.bmp", 0, 0, 500, 500) ; needed for some reason GuiCtrlSetState(-1,$GUI_DISABLE) ; display "Click to Continue" button $C2CBtn = GUICtrlCreatePic("C2C_off.bmp", 300, 300) ; display all of the above as a unit GUISetState(@SW_SHOW) While 1 $ggci = GUIGetCursorInfo($Form1) If $ggci[4] = $C2CBtn Then GUICtrlSetImage($C2CBtn,"C2C_on.bmp") Else GUICtrlSetImage($C2CBtn,"C2C_off.bmp") EndIf $nMsg = GuiGetMsg() Switch $nMsg Case $C2CBtn Exit EndSwitch Sleep(100) WEnd Resulting GUI Hovering the cursor over the button changes it as desired. Clicking on the button exits the demo (also desired). But it flickers constantly. Not desired! ;-) The attached button images and background image are all 24b bmp files. The actual image used in place of the white box consists of high quality text and graphics so I can't use JPG format. Welcometest.bmp C2C_off.bmp C2C_on.bmp
  3. Hi, i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/ So i came up with a not so pretty solution: #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label. Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution? Thanks in advance
  4. I tried to come up with a simple toolbar which displays the plain icons (without a button frame) but also shows a button effect when hovered or clicked on. My approach was to create a button, add an icon and hide the icon button again. Then place the icon without the button on top of it. When the mouse is moved over the icon I hide the icon (which leaves button displayed) giving me the hover effect for hover and clicks (using GUIGetCursorInfo() to get the icon ID). It seem to work ... but sometimes the hover effect does not show as expected especially when the mouse is moved slowly to the edge of the icon. While the icon ID is being read and action triggered (see Mouse OVER text) the icon itself is not being hidden (and button displayed). I found that the effect is more likely to occur when the GUI is freshly loaded. Can anyone reproduce this effect? I wonder what may causes this effect or is anything wrong in my coding? Any hint and support would be appreciated! Many thanks #include <StaticConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) f_toolbar() Func f_toolbar() Local $id_button_1_a, $id_button_2_a, $id_button_3_a Local $id_button_1_b, $id_button_2_b, $id_button_3_b Local $id_button_close Local $h_toolbar_gui, $msg_pop, $id_output_lbl ; -- Declare and set mouse over variables Local $last_tool_b_id = 0 ; ID of last button/icon visited Local $a_cursor_b_info ; GUIGetCursorInfo() array Local $win_w = 400 ; GUI width Local $win_h = 400 ; GUI height Local $icon_file = @SystemDir & "\shell32.dll" ; -- Create the GUI ------------------------------------------------------------------------------------------------------- $h_toolbar_gui = GUICreate("Toolbar hover - Test ...", $win_w, $win_h) ; -- A frame for the toolbar GUICtrlCreateLabel("", 3, 3, $win_w-3, 44, $SS_ETCHEDFRAME ) GUICtrlSetState(-1, $GUI_DISABLE) ; -- The Toolbar ; -- 1. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_1_a = GUICtrlCreateButton("1", 4, 4, 40, 40, $BS_ICON) ; Create BUTTON GUICtrlSetImage(-1, $icon_file, -71, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_1_b = GUICtrlCreateIcon($icon_file, -71, 4, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- 2. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_2_a = GUICtrlCreateButton("2", 44, 4, 40, 40, $BS_ICON) ; Create BUTTON GUICtrlSetImage(-1, $icon_file, -5, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_2_b = GUICtrlCreateIcon($icon_file, -5, 44, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- 3. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_3_a = GUICtrlCreateButton("3", 84, 4, 40, 40, $BS_ICON) GUICtrlSetImage(-1, $icon_file, -28, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_3_b = GUICtrlCreateIcon($icon_file, -28, 84, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- Lable CTRL for feedback $id_output_lbl = GUICtrlCreateLabel("Move mouse over toolbar ...", 4, 100, $win_w-8, 16) ; Lable for feedback GUICtrlSetBkColor($id_output_lbl, 0xFFFFFF) ; -- The Close button $id_button_close = GUICtrlCreateButton("Close", $win_w/2-40, $win_h-40, 80, 24, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) While 1 $msg_pop = GUIGetMsg() Select Case $msg_pop = $GUI_EVENT_CLOSE ExitLoop Case $msg_pop = $id_button_close ExitLoop Case $msg_pop = $id_button_1_a Or $msg_pop = $id_button_1_b GUICtrlSetState($id_button_1_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 1 pressed ...", 0, $h_toolbar_gui) Case $msg_pop = $id_button_2_a Or $msg_pop = $id_button_2_b GUICtrlSetState($id_button_2_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 2 pressed ...", 0, $h_toolbar_gui) Case $msg_pop = $id_button_3_a Or $msg_pop = $id_button_3_b GUICtrlSetState($id_button_3_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 3 pressed ...", 0, $h_toolbar_gui) Case Else $a_cursor_b_info = GUIGetCursorInfo($h_toolbar_gui) ; - $aArray[4] = ID of the control that the mouse cursor is hovering over (or 0 if none) Select ; -- Button 1 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_1_b And $last_tool_b_id <> $id_button_1_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_1_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_1_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_1_b And $last_tool_b_id = $id_button_1_b ; NO MOUSE OVER GUICtrlSetState($id_button_1_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- ; -- Button 2 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_2_b And $last_tool_b_id <> $id_button_2_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_2_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_2_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_2_b And $last_tool_b_id = $id_button_2_b ; NO MOUSE OVER GUICtrlSetState($id_button_2_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- ; -- Button 3 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_3_b And $last_tool_b_id <> $id_button_3_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_3_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_3_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_3_b And $last_tool_b_id = $id_button_3_b ; NO MOUSE OVER GUICtrlSetState($id_button_3_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- EndSelect EndSelect WEnd GUIDelete() EndFunc ;==> f_toolbar()
  5. Hi there ya'll! What I've got is 2 GUIs being ontop of eachother, one being the others parent. The parent serves mostly as a background as the child is a bit smaller, transparent and contains a set of images/icons. The child GUI also has a scrollbar created by _GUIScrollbars_Generate. The problem I'm having is that in the parent GUI I have an inputbox, created by GUICtrlCreateInput, and as that inputbox got focus I want to be able to scroll the child GUI. I can't set the inputbox in the child instead as I guess it would be too much work moving it as I scroll along. As I'm having it now I manually have to click inside the child GUI to be able to scroll it, and then click inside the parent/inputbox to type again. Don't know if there's any other great solution to this. I just thought that a mouseover scroll be OK! If you got any other solution I'd happily take that aswell! Best regards, zvvyt
  6. I created a program that allows the user to create a countdown showing days, hours, minutes, and seconds left. The colors fade from dark to light. You may also change the color of each column, red, green, or blue. Or shades of grey. The program also uses MrCreatoR's If you choose not to use the hover effect, just remove the lines of code that uses it. It makes it much more stylish with it. Countdown.au3 I made this because of Elder Scrolls V: Skyrim !
×
×
  • Create New...