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





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


View More Videos

Videos are provided via the YouTube API. All videos uploaded to YouTube are subject to their Terms of Service.




Privacy Policy - Terms Of Usage