try this instead
VB Code:
Public Function Rand(ByVal Low As Long, ByVal high As Long) As Long Rand = Int((high - Low + 1) * Rnd) + Low End Function Sub opponent() Dim computer(1 To 3) As String computer(1) = App.Path & "\carl.bmp" computer(2) = App.Path & "\antonio.bmp" computer(3) = App.Path & "\thomas.bmp" piccpu.picture = LoadPicture(computer(Rand(1, 3))) End Sub Private Sub Form_Load() opponent End Sub




Reply With Quote