Results 1 to 4 of 4

Thread: [RESOLVED] Simple picturebox question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    142

    Resolved [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.

  2. #2
    Addicted Member
    Join Date
    Jan 2012
    Location
    Athens, Greece
    Posts
    143

    Re: Simple picturebox question

    What abou if you use Is instead of = ?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    142

    Re: Simple picturebox question

    tried that but it just shows the swrdoutline image instead of giving error.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    142

    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
  •  



Click Here to Expand Forum to Full Width