ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Newbie: How to define the font size in the status bar window? (https://www.excelbanter.com/excel-programming/296425-newbie-how-define-font-size-status-bar-window.html)

Frank Krogh

Newbie: How to define the font size in the status bar window?
 
How do I define the font size in the status bar window before I apply the
Application.StatusBar = "text" ?

Thanks for any suggestion.


Frank





Tom Ogilvy

Newbie: How to define the font size in the status bar window?
 
I don't believe there is any vba object property to do this.

--
Regards,
Tom Ogilvy

"Frank Krogh" wrote in message
...
How do I define the font size in the status bar window before I apply the
Application.StatusBar = "text" ?

Thanks for any suggestion.


Frank







Frank Kabel

Newbie: How to define the font size in the status bar window?
 
Hi
AFAIK this is either a windows setting or can't be changed
at all.
-----Original Message-----
How do I define the font size in the status bar window

before I apply the
Application.StatusBar = "text" ?

Thanks for any suggestion.


Frank




.


Michel Pierron[_2_]

Newbie: How to define the font size in the status bar window?
 
Hi Frank;

Private Declare Function FindWindow& Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function FindWindowEx& Lib "user32" _
Alias "FindWindowExA" (ByVal hWnd1&, ByVal hWnd2& _
, ByVal lpsz1$, ByVal lpsz2$)
Private Declare Function GetDC& Lib "user32" (ByVal hWnd&)
Private Declare Function CreateFont& Lib "gdi32" Alias _
"CreateFontA" (ByVal nHeight&, ByVal nWidth& _
, ByVal nEscapement&, ByVal nOrientation&, ByVal fnWeight& _
, ByVal fdwItalic As Boolean, ByVal fdwUnderline As Boolean _
, ByVal fdwStrikeOut As Boolean, ByVal fdwCharSet& _
, ByVal fdwOutputPrecision&, ByVal fdwClipPrecision& _
, ByVal fdwQuality&, ByVal fdwPitchAndFamily&, ByVal lpszFace$)
Private Declare Function SelectObject& Lib "gdi32" (ByVal hDC&, ByVal hObject&)
Private Declare Function DeleteObject& Lib "gdi32" (ByVal hObject&)
Private Declare Function ReleaseDC& Lib "user32" (ByVal hWnd&, ByVal hDC&)

Sub StatusBarTest()
Dim BarState As Boolean, hWnd&, hDC&, hFont&, hObj&
BarState = Application.DisplayStatusBar
Application.DisplayStatusBar = True
hWnd = FindWindow(vbNullString, Application.Caption)
hWnd = FindWindowEx(hWnd, ByVal 0&, "EXCEL4", vbNullString)
hDC = GetDC(hWnd)
hFont = CreateFont(-12, 0, 0, 0, 700, 1, 1, 0, 0, 0, 0, 0, 0, "Times New Roman")
hObj = SelectObject(hDC, hFont)
Application.StatusBar = "This is my new police for StatusBar !"
MsgBox "How's that ?", 64
Application.StatusBar = False
SelectObject hDC, hObj
DeleteObject hFont
ReleaseDC hWnd, hDC
Application.DisplayStatusBar = BarState
End Sub

MP

"Frank Krogh" a écrit dans le message de
...
How do I define the font size in the status bar window before I apply the
Application.StatusBar = "text" ?

Thanks for any suggestion.


Frank








All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com