Results 1 to 6 of 6

Thread: [RESOLVED] Statusbar font size

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved [RESOLVED] Statusbar font size

    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?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Statusbar font size

    Statusbar like many other controls has a Font property. Hasn't it ever occurred to you to look at the properties of controls


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3
    gibra
    Guest

    Re: Statusbar font size

    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
    Last edited by gibra; Aug 7th, 2014 at 03:30 PM.

  4. #4

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Statusbar font size

    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.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] Statusbar font size

    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.

  6. #6
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: [RESOLVED] Statusbar font size

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width