[Solved] VB.net .. Error using objects? [closed]


The problem is that .FaceValue is not a property of a PictureBox. You would instead need to grab the FaceValue from your Deck based upon the cards generated.

In response to your comment below, try something like this…

Dim card1 as new card = deck.DealCard()
card1PictureBox.Image = GetCardImage(card1)

So, that’s how you set one of the PictureBoxes. You can do the second one. Then in your comparison to see who won…

if card1.FaceValue> card2.FaceValue then
    'blahblahblah
End if

9

solved VB.net .. Error using objects? [closed]