CyberSlug Posted January 23, 2005 Posted January 23, 2005 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 Example usage: #include <GuiConstants.au3> #include "GuiFontAndColors.au3" GuiCreate("Example", 300, 200) GuiSetBkColor($BACKGROUNDCOLOR) GuiSetFont($MESSAGEFONTSIZE, 400, 0, $MESSAGEFONTNAME) 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) GuiSetState() 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") EndIf WEndGuiFontAndColors.au3 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
ezzetabi Posted January 23, 2005 Posted January 23, 2005 Nice I idea. I used to toke some values by hand sometime, but making constants is surely a better idea. An other nice CyberSlug.
this-is-me Posted January 23, 2005 Posted January 23, 2005 Perfection. Good job Slugger. Who else would I be?
martin Posted January 24, 2005 Posted January 24, 2005 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.
this-is-me Posted January 24, 2005 Posted January 24, 2005 Global const only works with the latest beta version. Who else would I be?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now