Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

LEARN TO PROGRAM IN VB.NET 2008 LESSEN1 CURRENT TIME ON FORM

Loading...

Sign in or sign up now!
58,433
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 19, 2008

Gymjunnky.com Welcomes you to VB.NET 2008 this is tutorial 1 and my name is Gym_
In this tutorial I'm going to show you how to add the current time on a project

1st thing we need to do is open our copy of vb.net 2005 or 2008

Over on the left hand side u will see Open & Create

We want to click create project
This will then open up our templates window which u can choose what type of application you would like.

I'm going to make shore the icon marked as windows application which is the 1st icon on the far left is highlighted and then go Down to the very bottom were you will see a box marked NAME

By default this is called project windowsApplication1
I'm going to change the name of this to TIME

Then click OK
Now that our screen has loaded i notice we don't have a tool window so i click on view and then toolbox
And because id like it showing all the time and not popping in and out which annoys the crap outer me I'm going to click the pin icon at the top of the window which will leave the window open all the time.

Now what were going to do is click the label icon and draw a rectangle on our form.

Then were going to click on the timer icon and draw a box on our form and ull notice it put the timer on the bottom on the screen rather than the form its self like vb6 ect

Now what we want to do is turn out timer on when the form 1st loads up so we double click on a blank part of the form which takes us into form1 load in here we right

timer1. Enabled = true and then hit enter to take us down a line and write time1. Interval = 1

the interval works in milliseconds so we could easy just type 1000 which = 1 second but it's not going to make any real different this way.

After we have done that we need to type in our code to make the time show up

we need this inside out timer so one way of doing this is to click on form1 design tab at the top of the page and and then double click on the timer which will open it up so we can put out code in.

Now we're going to right label1. Text = timeofday this says we want the time of day in label 1

ull notice you have your most common actions in the drop down box appear when you are typing

This come in handy when ya can't spell for crap like some ppl not mentioning any names aaahh um Gym lol
Then we see whether it is working by clicking the play button and as u see there it is out form with the current time on it


To stop running the program we can ether click stop or just click the X that shuts the window,,

Well seeing that's working lets save out project so encase the power goes out or something we don't loss the work we have done so far

So we click file then Save all
It's going to save this in our documents which is ok seeing Vb 6 chucked it in bloody program files buried deep in C drive which was a pain in the ass to find

So lets say we wanted to keep this exactly how it is then we go up to the build tab and click build project name which is time so it says build time
Then we can go into our docs and open the VB 2008 folder then projects then the folder we named after our project which is time then another time folder then any of thou's folders contains our built project don't ask me why they do so many of them i didn't build that crap i only work with it,,,lol
Ok and then ull see time exe u can then click on this which will open the completed program or send it to ya mum and show her how cleaver you are,,,
So there ya have it


You can find the source code to all my projects as well as programming resource's
all my tutorials
and help forums for you to ask questions on so check out gymjunnky.com for more help
My name is gym and you have been watching learn vb.net 2008 tutorial no1

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (Gymjunnky)

  • kk thxs man it worked perfeco but how do u make it so that wen you make a button it can open up another window with something in it?

  • you would do that by going to the help forums on my site.

  • Goto the forums on my website mate .. make a new thread and ask in there i will be happy to help you out

Top Comments

  • LEARN TO SPELL LESSON 1... Just kidding, man. I couldn't resist.

  • Oh dude, you r the best~!!!

    Example of a cool programmer~!!!

    Keep up the good work and hoping u upload more cool clips on your web site, cheers

see all

All Comments (61)

Sign In or Sign Up now to post a comment!
  • hey please teach me how to add video

    to form in vb.net 2008

    i like to add video to my form which is

    present in my document.

    video in form must be played during

    run time.... ...

    please tell me the procedures and

    codes..... ......

  • How to trap MAC ADDRESS in text box

  • If u wanna join inbox me for details.Plz Join.

  • If Anybody Here Knows C++ or any other programing languages And Wants to be in a programing group inbox me on here.I Know C++ And want to start a group.its completly free.its a internet group.i got a website yall can join.

  • @SSmarkySS hey man u wanna join a group im tryin to start? its free

  • @SSmarkySS you make another form the way you want the button to bring it up and say you name it Form2 you put in the code of the button:Form2.Show()

  • I think interval of 1000 would be better because its equal to 1 second.

  • Dear Sir, Excellent….

    I watched your program and in the mean time, I did it while watching and I received the correct time of my machine… Thank You Very Much… I am interested in learning VB.NET 2008… I need your help in future.

    Thanks Bimal from Sri Lanka.

  • when i type time1.Text=1 well i get and error it have to do with text Error 1 'text' is not a member of 'System.Windows.Forms.Timer'.

    this is what it said when i try to press play help please!!!!!

    o and great video i understand all you were saing keep the great work!!!!!

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more