473,407 Members | 2,314 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,407 software developers and data experts.

VB.NET: How do i make a Digital Clock?

i need to make a digital clock for my computer class that looks like this

http://pheatt.emporia.edu/courses/20...signment04.htm

plz help
Sep 11 '07 #1
10 15058
Killer42
8,435 Expert 8TB
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidelines.

Then when you are ready post a new question in this thread.

MODERATOR
Sep 11 '07 #2
i write the code DateTime.Now() but it gives me the day, month and year along with the hour, minute, second. I only need the hour, minute, and second, do i need to make a Mid Function or something? im a total newb in VB Please help!

Here is what i got so far:
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.  
  3.     Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
  4.  
  5.     End Sub
  6.  
  7.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  8.         Label1.Text = DateTime.Now()
  9.     End Sub
  10. End Class
Sep 11 '07 #3
Killer42
8,435 Expert 8TB
... DateTime.Now() ...
Since I don't recognise the syntax, I'm guessing this must be one of the later (.Net) versions of VB?

If this was VB6, I'd say to use the Format() function. As for VB.Net, I have no idea. Try searching the online help for information on formatting date and time values.
Sep 11 '07 #4
im using VB 2005, it is required for school
Sep 11 '07 #5
Killer42
8,435 Expert 8TB
im using VB 2005, it is required for school
Well, like I said. For a simple syntax question like this, you should hit the online help for VB and search for terms like "date", "time" and "format".
Sep 11 '07 #6
Chill
5
Expand|Select|Wrap|Line Numbers
  1. Lbl_time= Format( Time,"HH:MM:SS")
  2.  
Use this - Time is a key word which gets instantaneous time of your PC
Sep 11 '07 #7
Killer42
8,435 Expert 8TB
Lbl_time= Format( Time,"HH:MM:SS")
Will this work in VB 2005? It looks like VB6 code to me.
Sep 11 '07 #8
hariharanmca
1,977 1GB
VB 6.0 is an earlier of VB.NET and VB 2005. All the basic methods of VB 6.0 will work in VB.NET and VB 2005.
So, we can give solution in VB 6.0 and point them this code is VB 6.0. That will be more helpful to them.
Sep 11 '07 #9
sgrec7
59
Will this work in VB 2005? It looks like VB6 code to me.
Bl***y hell Killer !!! But you are a mod!!! Reading through this and seeing untagged code just slip through the system like that... I dunno some times I think maybe me and you should swap roles ! :P no but seriously, there was some mean Admin that kept on PMing me about the code thing so just make sure that they don't get a VERY STERN and SCARY lecture like I had

And I know it had nothing DIRECTLY to do with the thread but ... :P

Keep up the good work killer

sgrec7
Sep 11 '07 #10
Ali Rizwan
925 512MB
i need to make a digital clock for my computer class that looks like this

http://pheatt.emporia.edu/courses/20...signment04.htm

plz help
Hello,
actually i m searching the threads and found this. So i think i can answer your question.
I have attached a file check it its very easy just 5 lines.
If you want a beautiful digital clock u ever seen in this forum then i ll made up for you.And i can do.
Attached Files
File Type: zip DC.zip (1.5 KB, 1621 views)
Sep 27 '07 #11

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

Similar topics

2
by: melanieab | last post by:
Hi again, I'm trying to draw a digital clock in the corner of a picturebox whenever a particular tabpage is in focus. I either need to be able to make the clock keep real time (I can get it to...
5
by: biltz | last post by:
hey...wanna source code of...digital clock by using nested for loop..if anybody know plzzzzzzzzzz...help me...i m getting eror in it..not sure wt do ....:(
4
by: 511475 | last post by:
Hi: I am an retired school teacher who went back to school for the fun of it. my subjects were computer hardware. I am taking a course in javascript and it is about to get the better of me. I...
24
by: mohsinalishah444 | last post by:
Dear All, PLZ TELL ME THE SOURCE CODE OF DIGITAL CLOCK IN C LANGUAGE . I REALLY NEED IT AND I DONOT KNOW HOW TO USE C LANGUAGE . ACTUALLY I WANT TO MAKE A CLOCK IN LINUX >IF ANY BODY POST ME THE...
4
by: aakriti | last post by:
how to make a digital clock from using code of java,
10
by: merooo0ooo | last post by:
HELLO how are u all ? i want to do digital clock applet may be it's very stubid qez but i'm still biggener in java and i want to any one learn me how i can used thread to do digital clock but...
6
Parul Bagadia
by: Parul Bagadia | last post by:
Hi all, I want to make a digital clock in ActiveX DLL... any components ofr that? As such in VB we have to use all in-built tools... How do we add an AcitveX DLL in other VB applications?.. I...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.