Jump to content
martin

Fix missing Tooltips in Windows 10

Recommended Posts

martin

Maximized Windows in Windows 10 usually (for me) don't show tooltips or hints.  For a short time following a WIndows update this was fixed on my laptop but after another day, and maybe another update, the problem returned, so I don't understand what the conditions are.

The script below checks for maximized windows and sets their size to a few pixels less than the screen size and this brings back tooltips.

I have found another way to fix the problem which might help some people. There are several programs I use regularly and the tooltips are important. On the programs I compile the tooltips help my users if they are not familiar with using the programs. If I set the maximum window size to be greater than the screen size ( @DesktopHeight/@Desktopwidth) then when maximized it still fits the screen ok but the tooltips still work. This can be done in AUtoIt with

GUIRegisterMsg($WM_GETMINMAXINFO, "MY_WM_GETMINMAXINFO")---- (search for examples)

In Delphi it can be done with Form.Constraints. I don't know about other languages.

For apps where the maximum size  can't be controlled the script below could help someone; it helps me at least.

Const $SPI_SETWORKAREA = 47, $SPI_GETWORKAREA = 48,  $SPIF_SENDCHANGE = 11


$StartRect = DllStructCreate("int[4]")
$PStartRect = DllStructGetPtr($StartRect)

$res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0)

$maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1)
$maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2)

While 1
    $aList = WinList()

    $res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0)

    $maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1)
    $maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2)

    For $i = 1 To $aList[0][0]
        If $aList[$i][0] <> 'Program Manager' Then
            $ws = WinGetPos($aList[$i][1])

         if isarray($ws) then;for some reason it isn't always
            If $aList[$i][0] <> "" And $ws[2] > $maxwid And $ws[3] > $maxht Then
                WinSetState($aList[$i][1], '', @SW_RESTORE);because changing the size leaves it as maximised as far as Windows is concerned!
                WinMove($aList[$i][1], '', $ws[0],$ws[1], $maxwid, $maxht)

             Endif
           EndIf
        EndIf
    Next
    Sleep(5000)
WEnd

 

25th January 2016. WIndows 10 had a major update overnight on my PC.  Now the problem with missing tooltips has gone. I din't know Microsoft studied these forums so carefully. So this means this script is no longer needed by me or anyone else.

24 Jan 2016 Edit again after Argumentum pointed out more than one monitor not allowed for. Not certain this is still correct but will test it with another monitor during next few days.

24th Jan 2016 Improved to use working area of desktop because the Taskbar  and other apps can use up some of the desktop, so a maximised window is not necessarily to desktop size. (I tried testing for @Maximized but it failed, and I didn't spend any time worying about why though it would be better.)

 

 

Edited by martin
To correct tags
  • Like 1

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
argumentum

I tried the code but "WinMove($aList[$i][1], '', 0, 0, $maxwid, $maxht)" moves everything from my 2nd monitor to 0,0
"WinMove($aList[$i][1], '', $ws[0], $ws[1], $ws[2], $ws[3])" works fine.
But I tried on Win7. 
Thanks for sharing 

Share this post


Link to post
Share on other sites
martin

Thanks argumentum, I hadn't thought of that even though I sometimes use 2 monitors myself. I've changed the code but it might not survive long.

  • Like 1

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
martin

Tooltips can be made to work in W10 when an app is maximized if the maximum window size is set to be larger than the screen size.

I added this information to post 1.

  • Like 1

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • antonioj84
      By antonioj84
      Hi all to the forum guru and expert I am trying to  automate this. in the registry  I have the network profile name network 2 and network   I want to  change their  CATEGORY  to Private .  Can someone lead me in the right direction.
      Private is 1 and Public is 0
      #RequireAdmin Global $sHKLMRoot = @OSArch = "x64" ? "HKLM64" : "HKLM" RegWrite($sHKLMRoot &"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" ,'/v NetworkList /t REG_MULTI_SZ /d 00000000 /f') see  attached picture below
      Much appreaciate
       

    • PhoenixPRO
      By PhoenixPRO
      When I try to automate this install program I can not get any of the buttons to click with the "ControlClick" function or any mouse movement to move the mouse to the and click it.  My OS is Windows 10 64Bit.  I have tried both 32bit and 64bit installs of Autoit V3 to no avail.
      I could not even get the run command to start the program until I used the variation of the command below in the script.
      With the script below the install program starts but will not click the "Next" button no matter what I do.
      Any help will be greatly appreciated.
      Thanks in advance.
       
      #include <MsgBoxConstants.au3>
      Opt("MouseCoordMode", 0) ;1=absolute, 0=relative to active window, 2=client
      Local $Success
      Run(@ComSpec & " /c " & 'C:\PhoenixPro_Install\RDXUtil\RDX_Tools_setup.exe', "C:\PhoenixPro_Install\RDXUtil", @SW_HIDE )

      WinWait("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      WinActivate("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      ControlClick ("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62", 1639, "left", 1) ;Next Button
    • TheWizEd
      By TheWizEd
      How do I work with 2D arrays.  I've tried this but get errors.
      Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
      ;$aTest[0][] = [10,11,12]  ; Error at []
      Local $sTest = ""
      For $i = 0 To UBound($aTest)-1
        Local $aExtract = _ArrayExtract($aTest,$i,$i)
        $sTest = $sTest & MyTest($aExtract)
      Next
      Func MyTest($aTemp)
        _ArrayDisplay($aTemp)
        ; Error at    v $aTemp
        Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF
      EndFunc
       
       
    • AndyK70
      By AndyK70
      I'm trying to fill a ListView with all normal viewable windows to act with them.
      First I tried with WinList:
      Local $aWinList = WinList("[REGEXPTITLE:(?i)(.+)]") Local $aTmp, $iID ;~ _ArrayDisplay($aWinList) For $i = $aWinList[0][0] To 1 Step -1 ; going backwards not disturbing the index while cycling through and deleting some If StringStripWS( $aWinList[$i][0], 3) == "" Or _ Not BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_VISIBLE) Or _ BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_MINIMIZED ) Then _ArrayDelete($aWinList, $i) Else ; Window has a Title and is "visible" $aTmp = WinGetPos($aWinList[$i][1]) If $aTmp[0] < -1000 Or $aTmp[1] < -1000 Then ; Window is minimized or tray icon _ArrayDelete($aWinList, $i) EndIf EndIf Next $aWinList[0][0] = UBound($aWinList)-1 ; getting actual # of windows ; Each row is now [ID]=> [Title], [hWnd] But it keeps getting Windows which are definitely not there at least not visible:

      Those windows "Rechner", "Einstellungen", "Netflix", "Microsoft Store", ... are not there!?! 
      It should list only the first three windows, which are real.
      I even tried it with _WinAPI_ UDF:
      $hWnd = _WinAPI_GetForegroundWindow() ; Add items _GUICtrlListView_BeginUpdate($idListview) If $hWnd <> 0 Then $iI = 0 Do If _WinAPI_IsWindow($hWnd) And _WinAPI_IsWindowVisible Then _GUICtrlListView_AddItem($idListview, WinGetTitle($hWnd)) _GUICtrlListView_AddSubItem($idListview, $iI, $hWnd, 1) $iI += 1 $hWnd = _WinAPI_GetWindow($hWnd, $GW_HWNDNEXT) EndIf Until $hWnd = 0 EndIf But it is the same...
       
      How can i distinguish those invisible windows from normal ones?
      PS: I'm using Windows 10, maybe it is important to know?
    • davidacrozier
      By davidacrozier
      Hello all ~
      I am running an autoit script on Windows 10 inside VMware Workstation 12 Pro version 12.5.2.  Technically I am remoting into ESXi which has a Domain Controller (DC), WebServer, FilServer, Windows 10, etc.  Using the GUI (i.e. running explorer.exe) I am able to open several different folders successfully.  The desktop, documents, USB external all open without issue.  The network share opening gives me issues.  Whenever I attempt to open \\filserver\users\user\sharedfolder I get the documents folder instead.  I understand that the documents folder is the default for explorer.  I have also attempted to use the letter drive mapped to the network share (Z:) and receive the same result.  When I run this script on Windows 10 alone without  the VM or the ESXi I am able to open the network share without problems.  I have tried to use the net use command to designate a letter M: to the network share folder prior to running the script.  This did not work for me.  
      One additional avenue I think might work is to use the systreeview321 and _GUICtrlTreeView_FindItem to step through the tree looking for the network share.  Once found,  double click on it and see if that opens the shared network folder.  I can click inside the VM with my mouse on the network share and it opens just fine.  Not sure if running up against GUI issues, or permission issues, or what?
      Thanks in advance,
      Davida Crozier
      TestNetworkShare.au3
      This script is a subset of a much larger program, but it illustrates what I am dealing with.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.