|
-
Jan 28th, 2012, 08:21 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Simple picturebox question
why does this give an error?
Code:
If Inventory.PictureBox5.Image = My.Resources.swrdoutline Then
MsgBox("Please equip a sword", vbExclamation, "Error")
Else
PictureBox1.Image = Inventory.PictureBox5.Image
End If
It says: 'Operator '=' is not defined for types 'system.drawing.image' and 'system.drawing.bitmap'.
By the way, 'Inventory is' a Form.
-
Jan 28th, 2012, 08:37 AM
#2
Addicted Member
Re: Simple picturebox question
What abou if you use Is instead of = ?
-
Jan 28th, 2012, 08:38 AM
#3
Thread Starter
Addicted Member
Re: Simple picturebox question
tried that but it just shows the swrdoutline image instead of giving error.
-
Jan 28th, 2012, 08:39 AM
#4
Thread Starter
Addicted Member
Re: Simple picturebox question
I got it now, thanks for the help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|