Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 10,226 of 10,840    |
|    Geoff to All    |
|    Help with parameter passing please    |
|    12 Sep 06 21:30:11    |
   
   From: gfriar@freenetname.co.uk   
      
   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(CardValue))   
      
    CardPic.Picture = LoadPicture("J:\vb\IF\PlayingCardImages\" + CValue +   
   ".gif")   
      
      
      
   End Sub   
      
      
      
      
      
   Private Sub ButDeal_Click()   
      
      
      
    Call PickCard(TheSuit, TheCardNo, MyCard)   
      
      
      
   End Sub   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca