Jump to content

Search the Community

Showing results for tags 'systemparametersinfo'.

  • 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 1 result

  1. Hello again. I'm trying to set the width of scrollbars in a gui to make them wider (so it can be easier to work with touch screens to scroll up and down). As Melba has pointed in his scrollbars udf's thread, I've been looking for info to change the width of the scrollbars using the _WinAPI_SystemParametersInfo function, but I've reached a point where I'm able to change some nonclientarea parameters and not the desired one This is an example script: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <WinAPI.au3> #include <WinAPIsysinfoConstants.au3> #include <WindowsConstants.au3> #include "GUIScrollbars_Size.au3" Global $scrollBarDimension = 260 ;Based on an example on the forum: $nonclientmetrics = DllStructCreate("uint;int;int;int;int;int;byte[60];int;int;byte[60];int;int;byte[60];byte[60];byte[60]") DLLStructSetData($nonclientmetrics,1,DllStructGetSize($nonclientmetrics)) ;initialize values to not reset all others ! $a = DLLCall("user32.dll","int","SystemParametersInfo","int",$SPI_GETNONCLIENTMETRICS, _ "int",DllStructGetSize($nonclientmetrics), _ "ptr",DllStructGetPtr($nonclientmetrics),"int",0) DllStructSetData($nonclientmetrics, $SM_CYSIZE, 15);This works, it changes the buttons size in the top of the windows DllStructSetData($nonclientmetrics, $SM_CXVSCROLL, 15); This doesn't works, I can not change the width of the scrollbars :( $a = DLLCall("user32.dll","int","SystemParametersInfo","int",$SPI_SETNONCLIENTMETRICS, _ "int",DllStructGetSize($nonclientmetrics), _ "ptr",DllStructGetPtr($nonclientmetrics),"int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDCHANGE));I don't know if this last BitOR will make the changes permanent ; Create and show the GUI $mainGUI = GUICreate("TEST", 300, 250) GUISetState(@SW_SHOW) ; Set scrollbars size $aRet = _GUIScrollbars_Size(0, $scrollBarDimension, 300, 250) ; Create the scrollbars _GUIScrollBars_Init($mainGUI) _GUIScrollBars_ShowScrollBar($mainGUI, $SB_VERT, True) _GUIScrollBars_ShowScrollBar($mainGUI, $SB_HORZ, False);I don't need the horizontal scrollbar _GUIScrollBars_SetScrollInfoPage($mainGUI, $SB_VERT, $aRet[2]) _GUIScrollBars_SetScrollInfoMax($mainGUI, $SB_VERT, $aRet[3]) ConsoleWrite("Scrollbars width: " & _WinAPI_GetSystemMetrics($SM_CXVSCROLL)) ;I see that the scrollbar has not a bigger witdh, but this shows me that $SMCXVSCROLL value is ok) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEndAny help would be trully aprecciatted.
×
×
  • Create New...