In this code I am trying to pass an image, as a parameter, out of the
procedure PickCard. The code will not support this. How do I pass an image
as a parameter?
Thanks again
Geoff
Dim TheSuit As Integer, TheCardNo As Integer, MyCard As Object
Private Sub PickCard(ByRef CardSuit As Integer, ByRef CardNo As Integer,
ByRef CardPic As Object)
Dim CardValue As Integer
Dim CValue As String
Randomize
CardSuit = Int(Rnd * 4 + 1)
CardNo = Int(Rnd * 13 + 1)
CardValue = 100 + (CardSuit - 1) * 13 + CardNo
CValue = LTrim(Str(CardV alue))
CardPic.Picture = LoadPicture("J: \vb\IF\PlayingC ardImages\" + CValue +
".gif")
End Sub
Private Sub ButDeal_Click()
Call PickCard(TheSui t, TheCardNo, MyCard)
End Sub
procedure PickCard. The code will not support this. How do I pass an image
as a parameter?
Thanks again
Geoff
Dim TheSuit As Integer, TheCardNo As Integer, MyCard As Object
Private Sub PickCard(ByRef CardSuit As Integer, ByRef CardNo As Integer,
ByRef CardPic As Object)
Dim CardValue As Integer
Dim CValue As String
Randomize
CardSuit = Int(Rnd * 4 + 1)
CardNo = Int(Rnd * 13 + 1)
CardValue = 100 + (CardSuit - 1) * 13 + CardNo
CValue = LTrim(Str(CardV alue))
CardPic.Picture = LoadPicture("J: \vb\IF\PlayingC ardImages\" + CValue +
".gif")
End Sub
Private Sub ButDeal_Click()
Call PickCard(TheSui t, TheCardNo, MyCard)
End Sub
Comment