Hello World
I'm back again. LOL
How to make an image arrays? I have 6 images named Button (Index from 1-6). I'm working on MouseMove events these images. So far I have these codes:
[CODE=vb]Public Sub DefaultImage()
It should be array
For i = 1 To 6
Button(i).Pictu re = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Next i
End Sub
Private Sub Button_MouseMov e(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
...
End Sub
[/CODE]
This is my previous code and the Button were not on control arrays. This is working. I just want to shorten my codes. Thanks : )
[CODE=vb]Public Sub DefaultImage()
Button1.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button2.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button3.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button4.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button5.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button6.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
End Sub
Private Sub Button1_MouseMo ve(Button As Integer, Shift As Integer, X As Single, Y As Single)
DefaultImage
Button1.Picture = LoadPicture(App .Path & "\Images\Button Hot.jpg")
End Sub
...
Private Sub Button6_MouseMo ve(Button As Integer, Shift As Integer, X As Single, Y As Single)
DefaultImage
Button6.Picture = LoadPicture(App .Path & "\Images\Button Hot.jpg")
End Sub
[/CODE]
I'm back again. LOL
How to make an image arrays? I have 6 images named Button (Index from 1-6). I'm working on MouseMove events these images. So far I have these codes:
[CODE=vb]Public Sub DefaultImage()
It should be array
For i = 1 To 6
Button(i).Pictu re = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Next i
End Sub
Private Sub Button_MouseMov e(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
...
End Sub
[/CODE]
This is my previous code and the Button were not on control arrays. This is working. I just want to shorten my codes. Thanks : )
[CODE=vb]Public Sub DefaultImage()
Button1.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button2.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button3.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button4.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button5.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
Button6.Picture = LoadPicture(App .Path & "\Images\Button Normal.jpg")
End Sub
Private Sub Button1_MouseMo ve(Button As Integer, Shift As Integer, X As Single, Y As Single)
DefaultImage
Button1.Picture = LoadPicture(App .Path & "\Images\Button Hot.jpg")
End Sub
...
Private Sub Button6_MouseMo ve(Button As Integer, Shift As Integer, X As Single, Y As Single)
DefaultImage
Button6.Picture = LoadPicture(App .Path & "\Images\Button Hot.jpg")
End Sub
[/CODE]
Comment