Domaine : cours
Tag : vb.net 2008
Aller à l'accueil


TAGS SPECIALISES :

vb
vb.net 2005
vb 6.0
vb 2008
interface vba
vb6 tutorial
vba word
cours vb
vb language
net visual c
visual studio 2008
tutorial vb
visual c
vb 2010 tutorial
visualbasic
vb6 gratuit
visual studio
vba tutorial
visual studio 2010
formation word
visual studio 2011
microsoft visual studio
cours vb6 pdf
cours vb 2008
vb 2008 cours
cours de vb 2008
cours visual c
cours de visual c



BlackJack Card Counter VB.NET 2008 TUT2





Owww hey yas caught me just having a few hand of blackjack.
Unfortunately I'm getting my ass handed to me once again its a pity that my brain ant quick enough to count cards..
Mm then again my computer is thou so how about we make up a small program to help do it for us
So 1st thing we need to do is load up vb.net and select new project
Then were going to need 3 buttons
Then were going to change the caption on the 1st button by selecting text in the properties menu and typing in ace king queen jack ten.
And you can move these around in any order or pattern that you like best like so
Then lets change the caption in the second button to 2 3 4 5 6
Mmm ok let just put more of a gap in that caption fill out the button front some more.
Ok that's good now the 3 button lets put in 7 8 9.
Ok now lets just swop these over
Now we need a label and lets use the text aline function to centre it and then change the text to 0.
Now lets make another label this time just by copying and pasting so we don't have to do everything again from scratch and then we will just delete the 0.
Ok let do out counting code really simple this is
Just double click the button and inside of it right
label1.text = label1.text +1
Then in out 2nd button we don't really need to right anything but because this is so simple we will anyway,, just copy and past our above line in ad change it from +1 to + 0
And then our 3rd button we past that again and change the + to a minis
Okays well now I'm going to make the label say something when our count is at a certain level so lets make a timer and in it put
Iflabel 1 . text = lets say -4 then label2 . text =Hit big baby
Mmm ok lets change that to something more sensible I guess how about bet big now.
And we make sure we put our quotation marks in this time
We didnt use quotation marks in the other labels because if we said label1.text = label1. Text + 1 in quotation marks then ever time we hit the button we would get 11111111 instead of it adding the count
Ok let run our code,,,
Mm well as u see our 2nd label text isn't showing up any one gess why..
Yerp spot on we didn't turn the timer on.
So we need the timer to run when the program is 1st started so we want the turn on code in form load
One way of doing this is just to click on a blank part of the form an then we type in
Timer1 . enabled = true
And then timer 1 . interval = 1
Now lets run it again
Ok well that works but its not going back off once it comes back on so what can we do ?
Your prob thinking we need to right something like if the count is greater then what ever shut ot down
Or if the count = 1 2 3 4 5 6 then do this and that but we don't need to go thou that much trouble
All we need to right is
If label 1 . text = - 2 then label2 . text = quotation quotation
That is simple hey
Ok so let run the program and have a look.
Great,, so there ya have it les then 5 minutes and we have a usefully application
Making handy little things that u can actuary use is great you don't need to spend 6 months making something for it to be usefully for yourself.
Well this is the point in time were I tell you that the source code for this project is available for download on my site as well most of the tutorials I do,also my own version of this program that has a lot more on it then what I have here, all the tutorial videos that I make heaps of cool free programs and best of all help forums were u can jump in and ask for help with any coding prob you may be stuck will that's all at gymjunnky dot com

code pour embarquer la vidéo : >>>    http://www.youtube.com/embed/JiHzzTqwG88    <<<






TAGS GENERAUX :

  cours du bath  moteur courant continu  cours access 2007  cours de droit  cours d électricité  cours du dinar  cours de grammaire gratuit  cours word  cours de word  jeux de cours