473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to put time and date in status bar

how to put time and date in status bar?

my code is like this : statusbar1.panels(1).text = "Status: OK"
but it doesn't work...

please help
Jul 7 '07 #1
3 5304
Killer42
8,435 Expert 8TB
how to put time and date in status bar?
my code is like this : statusbar1.panels(1).text = "Status: OK"
Can you give us more specific details than "doesn't work"? Does it produce an error at design time? At run time? Does it run? Does it produce an incorrect result or no visible result? For that matter, what version of Visual Basic are you using?
Jul 9 '07 #2
Esmael
58
Hi...


sample source code.

/************************************************** ***************/
Private Sub SetStatBar()
Dim panels As Panel

'Status Bar
SB.Move 100, 100, 800, 300
SB.panels(1).Text = "DTR System ..."
SB.panels(8).Text = "Today is: " & Format$(Now, " DDDD, MMMM dd,yyyy ")
With SB.panels
.Item(2).Style = sbrNum
.Item(3).Style = sbrScrl
.Item(4).Style = sbrCaps
.Item(5).Style = sbrIns
.Item(6).Style = sbrTime 'Display time
.Item(7).Style = sbrDate 'Display Date
End With
Set panels = Nothing
End Sub


/************************************************** ***************/
Jul 9 '07 #3
Killer42
8,435 Expert 8TB
I created a new project, added a StatusBar control, set the AutoSize to "spring" on all the panels (not sure whether this had any effect), inserted a bunch of panels so the code could run, then pasted your code. It appears to work just fine.

What problem do you have with it? As I said, we need something more specific than "doesn't work". For all I know, "doesn't work" could mean anything from "I don't like the colour very much" to "it burnt my house down and killed the dog".

By the way, after pasting your code I commented out these two lines, as they don't do anything...
Expand|Select|Wrap|Line Numbers
  1. Dim panels As Panel
  2. Set panels = Nothing
  3.  
Here's a snapshot of the results I got...
Attached Images
File Type: jpg StatusBar.jpg (7.0 KB, 578 views)
Jul 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: anthony hanson | last post by:
I am trying to write a stored proc the calculates a moving average over three periods. In the following example, I need to stratify the data by personID and RecordID in the #Temp table, but I am...
3
by: Vjay77 | last post by:
As a result from who is I am getting this: > > NOTICE AND TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic...
7
by: Brett Edman | last post by:
I created a UTC clock using this: UTCTime = MyTime.ToUniversalTime() Now that we've turned the clocks ahead 1 hour for daylight savings time, the clock is reporting the wrong UTC time. It is...
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
21
by: rdemyan via AccessMonster.com | last post by:
Is there a way to get the internet date/time. I saw an article that uses WinSock, but WinSock doesn't seem to be available in Access. I want to verify that the date/time on the local PC running...
0
by: oneplace | last post by:
I have the following script that use for the following after i have made my search for a name in my database. I select the name and it bring up this from with all the information of the person. It...
37
by: David T. Ashley | last post by:
I have Red Hat Enterprise Linux 4. I was just reading up about UTC and leap seconds. Is it true on my system that the Unix time may skip up or down by one second at midnight when there is a...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
1
by: saran3b2 | last post by:
Hi all, Please suggest us. My xml file is <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Y:\02-Thomson\Users\APT\xsl\vinoth-new.xsl"?> <report>...
9
by: LayneMitch via WebmasterKB.com | last post by:
Hello. Got another one for you folks. I'm working on this problem that wants me to 1. Prompt for name 2. Use pop-up box with name 3. Display current date on page in format "October 30, 2000."...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.