Page 1 of 1
Some with VB6 experience
Posted: Mon Mar 13, 2006 2:34 pm
by VCFL Commish
Someone with VB6 experience look at this for me.
http://au.geocities.com/rugbyfootballnr ... Chart.html
Its beem 6years since I took the Information System Program Course for the life of me I can`t remember how do alot of stuff
As you can see in the program all i want to do is for each button to change the picture to that spacific button could someone look at this and post the right code for me to do this.
RE: Some with VB6 experience
Posted: Mon Mar 13, 2006 4:40 pm
by NCrawler
Use the buttons click event, like this for the button labeled "Defence":
Command2_Click()
Picture1.Picture = LoadPicture(App.Path & "\Defence.bmp")
End Sub
Jon
RE: Some with VB6 experience
Posted: Mon Mar 13, 2006 5:50 pm
by VCFL Commish
First off thanks for that I really appreciate that.
Since I got you could you tell me how to add sound to my program here.I have been online leagues since 1997 so times you get trouble with people with good teams not being active so I built a little program to do do penality kicks it picks up to 4 against a team if they don`t send an update.If all 4 penality kicks were made that made a 8 point swing so it got there attention.
Could you tell me how to add wav files to this.
good.wav
nogood.wav
Randomize
result = Int((11 - 1 + 1) * Rnd + 1)
Select Case Val(result)
Case Is = 1
MsgBox "Good"
Case Is = 2
MsgBox "No Good"
Case Is = 3
MsgBox "Good"
Case Is = 4
MsgBox "Good"
Case Is = 5
MsgBox "Good"
Case Is = 6
MsgBox "Good"
Case Is = 7
MsgBox "Good"
Case Is = 8
MsgBox "No Good"
Case Is = 9
MsgBox "Good"
Case Is = 10
MsgBox "Good"
Case Is = 11
MsgBox "Good"
End Select
RE: Some with VB6 experience
Posted: Mon Mar 13, 2006 6:47 pm
by NCrawler
How about you just give me your email address and I'll send you a multimedia class to play wave files?
Jon
Edit: Also, looking at the code you have above...
If I were you, I would first dimension result as an integer and then when you select...case you will not have to convert the result with the val(string) statement. If you already have result as an integer, you can change the select case val(result) to just: select case result.
RE: Some with VB6 experience
Posted: Mon Mar 13, 2006 8:04 pm
by VCFL Commish
rugbyfootballnrl@yahoo.com.au
Any help would be appreciated thanks again.
RE: Some with VB6 experience
Posted: Mon Mar 13, 2006 8:11 pm
by NCrawler
On the way...
Jon