Jump to content

Winmove to full screen and fontsize


Recommended Posts

Hi, 

 

I have a gui set at 800*600

Then I use winmove to set the gui to @desktopheight and @desktopwidth

Everything looks nice (not perfect), but it works except the text in my buttons and labels keep the same size 

Is there a way to set the font higher based on the new resolution after winmove to the new resolution.

 

I  searched and found several possible solutions (for example the _FindMaxSize function) , but maybe I am missing the point, or it does not work after a the winmove.

Thank you

 

 

 

 

 

 

 

Edited by MightyWeird
Link to post
Share on other sites

Unless I don't understand correctly you can use GUICtrlSetFont()

#include <GUIConstantsEx.au3>

$window = GuiCreate("List", 280, 240)
$button = GUICtrlCreateButton("Resize", 115, 210, 50, 21)
$label = GUICtrlCreateLabel("8.5 size font (default)", 100, 100)
GUISetState()

$TaskBar = WinGetClientSize("[CLASS:Shell_TrayWnd]")

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_Close
            Exit
        Case $button
            Resize()
    EndSwitch
WEnd

Func Resize()
    WinMove($window, "", 0, 0, @DesktopWidth, @DesktopHeight - $TaskBar[1])
    GUICtrlSetData($label, "16 size font")
    GUICtrlSetFont($label, 16)
EndFunc

Or look into GUICtrlSetResizing()

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...