Jump to content

Get system font and color info!

Recommended Posts

The ATTACHED include file creates a bunch of constants that you can use to get font and color information for the current display settings. (I've only tested on Windows XP, so let me know if things don't work on Windows 9x/Me.)

You can now make text match the user's preferred font instead of using 8 point MS Sans Serif 8 :lmao:

Example usage:

#include <GuiConstants.au3>
#include "GuiFontAndColors.au3"

GuiCreate("Example", 300, 200)

GuiCtrlCreateLabel(" GUI has Desktop background color", 10, 10)
    GuiCtrlSetBkColor(-1, $INFOWINDOWCOLOR);label has tooltip color
    GuiCtrlSetColor(-1, $BUTTONTEXTCOLOR);label's text color

$button = GuiCtrlCreateButton("Click Me", 100, 100)

While 1
    $msg = GuiGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $button Then
        MsgBox(4096, "Note...","Message boxes use the correct font automatically")


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to post
Share on other sites

What is

Global const ....?

If I delete all the const's it's ok but am I missing something?

But I like the GuiFontsandColors, tx!

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.
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...