Results 1 to 2 of 2

Thread: Change button caption on right click

  1. #1

    Thread Starter
    Addicted Member run_GMoney's Avatar
    Join Date
    May 2002
    Location
    Detroit
    Posts
    186

    Change button caption on right click

    Can you code events behind a right click? For instance, I want to make the caption of a button an "X" on left click and an "O" on right click. Is this possible?
    Place Your VBForums Ad Here

  2. #2
    try this

    VB Code:
    1. Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2. If Button = vbLeftButton Then Command1.Caption = "X"
    3. If Button = vbRightButton Then Command1.Caption = "O"
    4. End Sub
    a 17 year old kid who has nothing better to do !
    and i never said i was right !!!

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