martin

Fix missing Tooltips in Windows 10

4 posts in this topic

#1 ·  Posted (edited)

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
1 person likes this

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



Share this post


Link to post
Share on other sites

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.

1 person likes this

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

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.

1 person likes this

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

    • dreivilo47
      By dreivilo47
      When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10.
      Syntax Check (Ctrl+F5) gives no errors.
       
      Example 1:
      ; Create a browser window and navigate to a website #include <IE.au3> Local $oIE = _IECreate("www.autoitscript.com")  
      The error I receive with F5 (Tools, Go) in SciTE:

    • Chaym
      By Chaym
      Does AutoIT supported  in Windows 10 OS (x64)?
      After installing AutoIT in x64 OS and recompiling code,
      I get a lot of error messages...
       
    • kristo
      By kristo
      The DriveGetDrive command returned all drives (option "ALL") for years now and my program could always rely on that function. Suddenly a drive letter that was created with the subst command does not appear in the list of drives anymore. And it clearly did, because I used to react to a certain subst command by reacting to new or revoked (subst /D) drive letters.
      Why is that? I think this a bug because there's no way left to list ALL drive letters anymore.
      And why should I use an API command for that when this was already built in for years?

       
    • kokoilie
      By kokoilie
      I'm making a program that has a combo control in a gui and back in win7 when the window was focused the scroll wheel could be used to scroll through it's contents, now i'm using win10 and i have to put the mouse on that control to scroll up and down.
      Since now the scroll wheel works depending on where the mouse is, is there a way to make it no matter where on the gui the pointer is?
      Also if the only way to do it is some complex hotkey functions will it work with pressing space to toggle a checkbox?
      If you need to see what i have so far let me know and i'll copy it here.
    • ModemJunki
      By ModemJunki
      Hello,
      In Windows 10 PowerShell, one can do this to change the metric for a NIC in Windows 10:
      Get-NetAdapter | Where-Object -FilterScript {$_.InterfaceAlias -Eq "Ethernet 2"} | Set-NetIPInterface -InterfaceMetric 2 I know I can script the above PowerShell line (and it works!), but I wanted to try something I hadn't done before after looking into jguinch's most excellent Network configuration UDF. I wanted to make use of the SetIPConnectionMetric method in the WMI classes. There is an example VBscript here but this is not for Windows 10. Using AutoIT would also give better control over capturing error return codes than with PowerShell.
      But I cannot get my script to work! The return from SetIPConnectionMetric() is 0, which would indicate success. Yet the change does not happen. I also tried WMI methods using .put_ but this fails.
      Anyone more experienced than I have ideas to make this work?
      #RequireAdmin _SetNicInterfaceMetric2("Ethernet 2", "2") Func _SetNicInterfaceMetric2($NIC_NAME, $METRIC) Local $s_setIndx = 0 $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & "." & "\root\cimv2") $colNICItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionID = '" & $NIC_NAME & "'", "WQL") If IsObj($colNICItems) Then For $objItem In $colNICItems $s_nicIndex = $objItem.Index Next ConsoleWrite("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'" & @CRLF) $colNAC = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'", "WQL") If IsObj($colNAC) Then For $objNetCard In $colNAC If $METRIC <> $objNetCard.IPConnectionMetric Then ConsoleWrite("Metric was set to " & $objNetCard.IPConnectionMetric & ". Setting to " & $METRIC & "." & @CRLF) $s_isSet = $objNetCard.SetIPConnectionMetric($METRIC) ConsoleWrite("SetIPConnectionMetric Result = " & $s_isSet & @CRLF) Else ConsoleWrite("Metric is already set to " & $METRIC & @CRLF) EndIf Next EndIf EndIf EndFunc ;==>_SetNicInterfaceMetric2