Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Help with time in a statusbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help with time in a statusbar

 Post Reply Post Reply
Author
Message
jordenes View Drop Down
Newbie
Newbie


Joined: 02 June 2017
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote jordenes Quote  Post ReplyReply Direct Link To This Post Topic: Help with time in a statusbar
    Posted: 02 June 2017 at 12:34pm
Hello and good I am new with these OCX but I have a problem when I want to create a statusbars with the hour and that this is updated every 1 minute or better that is updated to the actuactual hroa, if you can help me I would be very grateful
Back to Top
rmcmanamy View Drop Down
Groupie
Groupie


Joined: 02 September 2009
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmcmanamy Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2017 at 10:03am
This post might help you out.

http://forum.codejock.com/forum_posts.asp?TID=16405&KW=statusbar+time&title=solvedhow-can-i-put-current-oclock-in-statusbar
Product: Xtreme SuitePro (ActiveX Unicode) version 22.0.0

Platform: Windows 11 (64bit)

Language: Visual Basic 6.0

Back to Top
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2017 at 3:29pm
In main form :

1) declare: Const ID_INDICATOR_TIME = 10000

2) in Form_Load event  create a StatusBarPane object:

    Dim Pane As StatusBarPane
    Set Pane = StatusBar.AddPane(ID_INDICATOR_TIME)
    Pane.Width = 50
    Pane.Visible = True
    Pane.BeginGroup = True
    Pane.Style = SBPS_NOBORDERS
    Pane.Text = Format$(Time, "HH:SS")


3) a Timer i.e. Timer1 and set the Interval = 10000

In Timer1_Timer() event:

    Private Sub Timer1_Timer()
        Dim TimePane As StatusBarPane
        Set TimePane = StatusBar.FindPane(ID_INDICATOR_TIME)
        TimePane.Text = Format$(Time, "HH:SS")
    End Sub


Run the project.

gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.