Some with VB6 experience

A section for those creating 3rd party tools and add ons. Lots of techincal code creation type questions would go here.

Moderator: David Winter

Post Reply
User avatar
VCFL Commish
Posts: 518
Joined: Tue Feb 28, 2006 6:36 pm

Some with VB6 experience

Post 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.

NCrawler
Posts: 26
Joined: Tue Jun 03, 2003 9:19 pm
Location: Sherwood, AR

RE: Some with VB6 experience

Post 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
User avatar
VCFL Commish
Posts: 518
Joined: Tue Feb 28, 2006 6:36 pm

RE: Some with VB6 experience

Post 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
NCrawler
Posts: 26
Joined: Tue Jun 03, 2003 9:19 pm
Location: Sherwood, AR

RE: Some with VB6 experience

Post 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.
User avatar
VCFL Commish
Posts: 518
Joined: Tue Feb 28, 2006 6:36 pm

RE: Some with VB6 experience

Post by VCFL Commish »

rugbyfootballnrl@yahoo.com.au

Any help would be appreciated thanks again.
NCrawler
Posts: 26
Joined: Tue Jun 03, 2003 9:19 pm
Location: Sherwood, AR

RE: Some with VB6 experience

Post by NCrawler »

On the way...


Jon
Post Reply

Return to “3rd Party Developers Area”