Results 1 to 6 of 6

Thread: Picturebox click event handling. (Resolved)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Resolved Picturebox click event handling. (Resolved)

    I want to have each click on the picturebox do something according to which click it is. The first will set the box to 3d border, the next will set it back to no border.
    I thought for sure this would work:
    VB Code:
    1. Private Sub pbxDieOne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxDieOne.Click
    2.         If clickCntrD1 = 0 Then
    3.             clickCntrD1 += 1
    4.             pbxDieOne.BorderStyle = pbxDieOne.BorderStyle.Fixed3D
    5.             'next the image will become a blank die so we can tell which dice we have chosen to change
    6.         End If
    7.         If clickCntrD1 = 1 Then
    8.             pbxDieOne.BorderStyle = pbxDieOne.BorderStyle.None
    9.             'next the image will become a blank die so we can tell which dice we have chosen to change
    10.             clickCntrD1 = 0
    11.         End If
    But alas, the picturebox's border doesn' change. The picturebox's border will change if I have only one action for it to take, like just make the picturebox's border 3d when someone clicks on it. But I want the person to be able to click on the picturebox again to reset it.
    THank you in advance.
    Last edited by gjon; Feb 2nd, 2005 at 12:00 AM.

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