sorry the spacing in my other comment got messed up heres how it is Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case vbKeyUp ball.Top = ball.Top - 1 Case vbKeyDown ball.Top = ball.Top + 1 Case vbKeyLeft ball.Left = ball.Left - 1 Case vbKeyRight ball.Left = ball.Left + 1 End Select End Sub
Private Sub Form_KeyPress(KeyAscii As Integer) With Ball If KeyAscii = 119 Then .Top = .Top - 30 ElseIf KeyAscii = 97 Then .Left = .Left - 30 ElseIf KeyAscii = 115 Then .Top = .Top + 30 ElseIf KeyAscii = 100 Then .Left = .Left + 30 End If End With End Sub
i have vb2008 and the whole thing is just different. i actually just want that function to press a key and something happens, but how does that work at vb2008?
my buddy made a card game and i copywritten it and made shirts for it. it is really amazing, do you think you can recreate it in vb??? i will send u da rules and regulations if you will help me...thanx in advance xD
Simpler code Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case vbKeyUp Shape1.Top = Shape1.Top - 100 Case vbKeyLeft Shape1.Left = Shape1.Left - 100 Case vbKeyDown Shape1.Top = Shape1.Top + 100 Case vbKeyRight Shape1.Left = Shape1.Left + 100 End Select End Sub
What you made here is what we had to do as one of our first lessons in school XD
tho we did it totaly difrent
We made keys wich you had to press to make the plane move, and then use 'Call' and put it on the arrow keys, call the button and get the effect the button would do.
In Game Maker you can create AWESOME GAMES but i i i.... I... was learning its language but sudendly i lost my inspiration but ill start to learn again im 13 years old and i STILL know the stuff i gona go back to WORK !
update this or not... idk i just like typing
FOZGamez 1 month ago
hey, thanks. I didn't even know how to use the Ascii before that
AndyLun09 1 month ago
you are just teaching how to move a shape...its not a game but nice example!
rauliweb 1 month ago
nice. make it.. could you teach me how to make a picture puzzle in VB6.0
thank you so much. :)
UPL09DER 2 months ago
nice music!!
456jugglingman 3 months ago
It just goes up!
ajf100 3 months ago
....musics a piece of shit i must say but great vid
MrROFL92 4 months ago in playlist game
great music choice! Saw them in concert last month.
kratos4evr 5 months ago
Thanks for the tutorial..!! But do something about the background music..!!
AmuNagarkar 5 months ago
good vid bad song
happyman12able 5 months ago
thnx very much
ujjawalpanchal 6 months ago
thanx
Barfey1019 6 months ago
Nice Music
Hammond511 6 months ago
awesome tutorial!
MegaK311 8 months ago
fuck it
it dosen't work
kareem21111 8 months ago
ok nevermind stupid youtube wont post my comment with appropriate spacing >_<
BioExtract 9 months ago
BioExtract 9 months ago
actually instead of using the ascii code you could just type this I think its alot easier
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyUp ball.Top = ball.Top - 1
Case vbKeyDown ball.Top = ball.Top + 1
Case vbKeyLeft ball.Left = ball.Left - 1
Case vbKeyRight ball.Left = ball.Left + 1
End Select
End Sub
BioExtract 9 months ago
u noob
Trey3033 9 months ago
wtf??? u cant go up!!!
Trey3033 9 months ago
ok i found it now it works perfectly thx
panayiotis70 9 months ago
D doesn't works for me
panayiotis70 9 months ago
nice vid dude
panayiotis70 9 months ago
Ugh, I need a video with voice... -.-
Good job on Children of Bodom though. Melodic Death Metal ftw!
xXxZeffaxXx 10 months ago
Pretty cool... Thanx
billrock12 10 months ago
can i have the codes please??
jaridcharlene 1 year ago
put code in description plz?
RamJim9697 1 year ago
I you want to learn programming, join my forum at:
shotbot(dot)tk/
Replace the (dot) with .
StickArenaNerdz 1 year ago
Deathmetal is actually death of the ears.
NewSheeptor 1 year ago 2
@NewSheeptor its not.
ultravanz 11 months ago
@NewSheeptor I agree :)
TheMismu 11 months ago
theres a much easier way of registering a keypress than an ASCII code.
Select Case KeyCode
Case vbkeyW 'events to happen here
case vbkeyA
'events
End Select
TheClubland2010 1 year ago
@TheClubland2010 or even this under the paint event : if my.computer.keyboard.(key).keystatedown then
'add code
end if
Nickolakis21aek 1 year ago
code plase
CriminalGrand 1 year ago
nice song
Twitchvlad10 1 year ago
Nice tutorial :D
myvideoscom 1 year ago
hehe
rhodge0628 1 year ago
How do you know what numbers are needed to complete the equations?
JustinBlottin 1 year ago
thanks a lot dude
zengrz 1 year ago
Holy shit that was an epic tutorial
Garthmix 1 year ago
Really nice man :D just one thing my a bottoun dont work;(
jingiisman 1 year ago
Iyall stop saying this fails and it doesnt work it works for me yall just didnt type the code right or sumthing
CP100FLAMES 1 year ago
WOOHOO SUOMI!
Thesupermario100 1 year ago
it only goes up
hennayatsu6969 1 year ago
Your awesome i need to activate something when it moves towards a lable help please :)
ALEG0Man360 1 year ago
realy good tut but why does that ball firstly stuck then go? can u help me with that?
deluksic 1 year ago
Baydude98 1 year ago
Doesn't work
behind822 1 year ago
i have vb2008 and the whole thing is just different. i actually just want that function to press a key and something happens, but how does that work at vb2008?
Anoburn 1 year ago
zhadowjohn, can you tell me that is it possible to make an email sending keylogger in visual basic 6 enterprise? reply plz :P
iHack2U 1 year ago
@iHack2U
It is possible!
im not zhadowjohn but search in youtube!
7Sn0w 1 year ago
i am using vb 2008 and i got the code right but the ball wont move, what do i do now?
Greener7771 1 year ago
@tobin2k9 SHIFT + F3
hanselchang2009 1 year ago
w a s d
DorelBPR 1 year ago
fucking music doesnt fit at all to the video lol music is a fail
thoosejakob149 1 year ago
oot suomalaine :D
FunToJump 1 year ago
hey thanx now i get to practice my remembering skills for theese little annoying codes! hehehe but anyway thanx man!
z1782 1 year ago
i have visual studio 2008 profetional how can i do this?
Grandboy3000 1 year ago
You can use similar code -
Use picturebox instead of shape etc
mandai2 1 year ago
Mine Works Pefectly.
Nice Video ^_^
sadeerlol 1 year ago
My one moves Left and right but not down
refz1234 1 year ago
mine doesn't work :((
DonGabrieli 1 year ago
is this like vb6?
pokemonfan904 2 years ago
it IS vb6
Turtlezr00l 1 year ago
rofl xDDD
atamanaslt1 2 years ago
my buddy made a card game and i copywritten it and made shirts for it. it is really amazing, do you think you can recreate it in vb??? i will send u da rules and regulations if you will help me...thanx in advance xD
irishignite 2 years ago
lol they had card games since atari and i dont remember them raving about shirts back then
mandai2 1 year ago
thanks .^^.
Kmadness01 2 years ago
i got the moving to work. now i want to know if there is a way to block the ball. like keeping it out of an area with an inpassable line.
DiddlyDoodKing 2 years ago
in VB(dot)Net you can add this to the top of the key pressed event:
If Me.Bounds.IntersectsWith(PictureBox1.Bounds) Then
'it is within the main form space
End If
mandai2 1 year ago
grr mine doesn't move
rjc0l3 2 years ago
same
DiddlyDoodKing 2 years ago
Comment removed
1Mihailo 2 years ago
lol... then if you search for vb 2008? whats with that?
kruzs123 2 years ago
heeyyyy what is this song i like it
woodworm013 2 years ago
Children of Bodom: Bed of razors
Fabscheidy 2 years ago
Cool man!!! 5 STARS for you!!
borkogamerr 2 years ago
wow thank you very much. it's very good
ste169biffi 2 years ago
this is portable edition!!!
sgsagasgfdsfdsafsdaf 2 years ago
what do u use to show the messages? and what is that bar that you have all the programs to in the right side?
richy122333 2 years ago
His properties box?
Goosebumbsfan 2 years ago
express edition
NikPor67 2 years ago
Moro Käytäks nykyään VB 08:a Tiesin et oot suomesta kun siel luki AVAA =D
rupluttaja 2 years ago
Dude RobloxJ if your a idiot that can't read, It says Make a Game with Visual Basic 06 not your damn Visual Basic 2009.
ernestlee1 2 years ago
This comment has received too many negative votes show
Dude you wasted my time this doesn't work with 09 bitch.
RobloxJ 2 years ago
roblox your a dumbass
RynoBGood 2 years ago
ty veery much
tiesykiller 2 years ago
dude mine wont go down :(
MegaLokiman 2 years ago
yeah mine wont go right
xkidd092 2 years ago
Epic music XDDD
JeffyJeff333 2 years ago
asome
Robobbly 2 years ago
thanks i made it!
wowoweee90 2 years ago
does any one know the ascii for the arrow buttons???
jacobthefool 2 years ago
try:
msgbox(KeyAscii)
It will show you what they are when you press keys.
mandai2 1 year ago
Vb6AndFlashTutorials 2 years ago
What you made here is what we had to do as one of our first lessons in school XD
tho we did it totaly difrent
We made keys wich you had to press to make the plane move, and then use 'Call' and put it on the arrow keys, call the button and get the effect the button would do.
froobi 2 years ago
YOU ROCK!
alginonico 2 years ago
CoB FTW!!!!!
OlloX3 2 years ago
wow dont itro it the title says it already just start it with ok here we go
BlueNinjaChidori 2 years ago
instead of 3 ifs in an if function, wouldnt it be more uselful to use a CASE statement? or is CASE not used in Visual Basic?
johnscott10 2 years ago
the youtube vid wont load
jacksparrow322 2 years ago
what did u use to record your screen?
please tell me
btw nice video
IlslipperdipperlI 2 years ago
I think it's Hypercam2
But I refer Camstudio...
CPFlare 2 years ago
Im guessing camtasia...
tcpnet 2 years ago
sweet dude i usually use VB for making trainers ( check it out on my page )
eballer48 2 years ago
thank you
kidofnaz 2 years ago
how can i move ball????
junction115 2 years ago
WITH a,s,d and w
christiaandm 2 years ago
thanks man
Farid9090 2 years ago
gay music
GreenWarez 2 years ago
Hey...mine didn't work could you help me out?
firehead333 2 years ago
Sorry I'm new at this but how do you get the Ascii in there?
eap415 2 years ago
eap415 in the vid he shows the ascii so you can type it in yours too
ownageatwarfield 2 years ago
with this tutorial you can start making good games =)
kiloneie 3 years ago
its simple
Duxasblt 3 years ago
stupid game
00team00 3 years ago
wow...
a moving ball...
STUPID.
mavamaarten 3 years ago
In Game Maker you can create AWESOME GAMES but i i i.... I... was learning its language but sudendly i lost my inspiration but ill start to learn again im 13 years old and i STILL know the stuff i gona go back to WORK !
kiloneie 3 years ago 2
yo how do u handle collisions?
quick times bro i need it
ownd785 3 years ago
In VB(dot)Net you can use:
Dim collided As Boolean = Control.Bounds.IntersectsWith(Control.Bounds)
mandai2 1 year ago
whats the name of the first song?
Johnbond27 3 years ago
Sounds like a song by Alesana
SFOC2010 3 years ago
Or maybe something by The Kovenant
SFOC2010 3 years ago
The first song is Children of Bodom - Bed of Razors second is Children of Bodom - Kissing the Shadows
ZhaDowJohn 3 years ago
mr sir make another vid but wit 2008 plz
Zunkle490 2 years ago
whats the keyAscii for:
p
space
stuzguy 3 years ago
ok i got p
p=112
i used to make pause so i put(after key 100)
Elself KeyAscii = 112 then
msgbox "paused", vbinformation
stuzguy 3 years ago
is it normal for "ByVal" to appear before the "KeyAscii As Integer"
cokemaniac1 3 years ago 2
cause it didnt work...
cokemaniac1 3 years ago
ya mine says that too
stuzguy 3 years ago
when i try it i get errors like 'top' and 'left' is not a member of system.drawing.bitmap
cokemaniac1 3 years ago
are you sure you aren't trying to change a bitmap object? 'top' and 'left' are properties of form controls.
mandai2 1 year ago
ok, so if i were using a image i created, how would i manage to make it change images as it moves?
cokemaniac1 3 years ago
Well in VB(dot)Net you could use:
pictureBox.Image = Image.FromFile("filename.jpg")
VB6 should have a similar syntax.
mandai2 1 year ago
it didn't work
jacobgb1996 3 years ago
can u copy and pest From Private sup for end sup plese??
60J11 3 years ago
not exactly a game, -.-" but good :)
masterzfrombelow 3 years ago
lol yes something like this is called a toy, since you can't win or lose.
mandai2 1 year ago