Jump to content

Search the Community

Showing results for tags 'setfont'.

  • 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. Hey Guys, I am Struggling with a issue that i cannot seem to fix. I hope that you guys can help me with this. I have a GUI with some text attributes, for all i use the following code; $Label_ts_Header = GUICtrlCreateLabel("Manual Adress", 60, 10, 500, 50) GUICtrlSetBkColor($Label_ts_Header, $COLOR_WHITE) GUICtrlSetFont ($Label_ts_Header, 26, 800, 0, "Calibri") This is all working like it should, but when i activate the GUI on another pc the text size is bigger and the GUI size is somewhat smaller. The problem is that it isn't on all computers, i can't seem to find the problem,.. If i make it fit on one pc it is to small on another or to big,.. What am i doing wrong? Is there some kind of attribute that i need to add to the top of my script to normalize text sizes in the script? Thanks! EDIT: Found the problem guys, some computers has changed the text size to 125% // Can i force 100% for my GUI somehow ? EDIT2: Fixed it guys! // I used the Function Below to get the DPI Setting and used that to determine the text size (example below) Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96) _GDIPlus_Startup() Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0) If @error Then Return SetError(1, @extended, 0) Local $aResult #forcedef $__g_hGDIPDll, $ghGDIPDll $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0) If @error Then Return SetError(2, @extended, 0) Local $iDPI = $aResult[2] Local $aresults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef] _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_Shutdown() Return $aresults EndFunc ;==>_GDIPlus_GraphicsGetDPIRatio $Label_S2 = GUICtrlCreateLabel("Data from The Base", 10, 300, 400, 20) GUICtrlSetBkColor($Label_S2, $COLOR_WHITE) GUICtrlSetFont ($Label_S2, 13 * _GDIPlus_GraphicsGetDPIRatio()[0])
×
×
  • Create New...