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: 41
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) version 13.4.0

Platform: Windows 7 (64bit)

Language: Visual Basic 6.0

Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 260
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 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.125 seconds.