Is it possible to modift the font size in a statusbar control? Maybe subclassing can do the trick but is there any clever way around?
Printable View
Is it possible to modift the font size in a statusbar control? Maybe subclassing can do the trick but is there any clever way around?
Statusbar like many other controls has a Font property. Hasn't it ever occurred to you to look at the properties of controls
Simply change the font attribute (size, bold, ...) in Properties, or from code:
Code:Private Sub Form_Load()
With StatusBar1
.Font.Size = 14
.Font.Underline = True
With .Panels(1)
.Text = "Date"
.Width = 1000
End With
With .Panels(2)
.Text = Date
.Width = 2000
End With
End With
End Sub
In the past I never needed to change the font size for a control that didn't have its own fontsize property so I wasn't even aware fonts have their own properties.
Thanks.
Having a FontSize property is a quirk inherited from the early days of VB, probably VB4 and earlier.
Starting with VB5 (and maybe VB4 32-bit, hard to remember that far back) we had the StdFont type, saving lots of coding to implement so many separate font-related properties when writing a control. Intrinsic VB controls already had the code written so it only needed to be kept updated as VB evolved.
Yes VB4 has the Font property like VB6 where VB3 has the font settings all separated in the properties menu
I re-installed both of these a while back to help someone convert an old VB3 project to VB6