VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Change System (Message, Menu, Caption) Fonts

bluenile  (3 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

' Heres a very simple code to change the system
' NONCLIENTMETRICS like the the window title font,
' the message font,menu font using VB. You can also change
' other elements like status font etc
' in your window only or all the open windows
' like PLUS! or display settings (appearance)
' also it is possible to underline, strikethru fonts in
' your window with this code. This code is very useful
' if you are coding a multi-lingual software.
' For more info and more free code send e-mail.
' code by - NILESH P KURHADE
' email - [email protected]

Inputs
ADD A COMBO BOX

Assumes
Add a Combo box.

Returns
Changes the Message box font and Windows Caption Font (Title Font).

Side Effects
None that I know of.

API Declarations
Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(1 To 32) As Byte
End Type
Private Type NONCLIENTMETRICS
cbSize As Long
iBorderWidth As Long
iScrollWidth As Long
iScrollHeight As Long
iCaptionWidth As Long
iCaptionHeight As Long
lfCaptionFont As LOGFONT
iSMCaptionWidth As Long
iSMCaptionHeight As Long
lfSMCaptionFont As LOGFONT
iMenuWidth As Long
iMenuHeight As Long
lfMenuFont As LOGFONT
lfStatusFont As LOGFONT
lfMessageFont As LOGFONT
End Type
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As NONCLIENTMETRICS, ByVal fuWinIni As Long) As Long

Rate Change System (Message, Menu, Caption) Fonts (6(6 Vote))
Change System (Message, Menu, Caption) Fonts.bas

Change System (Message, Menu, Caption) Fonts Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters