473,882 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
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 15119
Killer42
8,435 Recognized Expert Expert
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
novuseden
3 New Member
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 Recognized Expert Expert
... 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
novuseden
3 New Member
im using VB 2005, it is required for school
Sep 11 '07 #5
Killer42
8,435 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
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 Top Contributor
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 New Member
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

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

Similar topics

2
4239
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 draw when the page loads, but it won't "tick") or I need to be able to draw a transparent label background (I can get the clock working on a solid color label). Thanks again for everyone's help! Melanie
5
12083
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
5012
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 need some help with is this one. I got it to validate. But something is wrong with the logic maybe. It bombs out on object expected . Please give me some input. thanks <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD...
24
29915
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 CODE I HALL BEW VERY THANKFUL TO HOMPLZ DO REPLY ME PLZ
4
2740
by: aakriti | last post by:
how to make a digital clock from using code of java,
10
3220
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 step by step and how can used threads in any another program and console how can i read in thing and give me output on consol what is step as i want to draw smile face on console thank u all;
6
3036
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 checked many documents on google but all just explained regarding download thing.. I have done some programs in VB before but havent worked with AciveX... Plz reply soon.
0
9931
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9777
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10725
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10830
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9557
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7956
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7113
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.