Results 1 to 2 of 2

Thread: Stopping the Double Clickers

  1. #1

    Thread Starter
    Addicted Member AmmerBow's Avatar
    Join Date
    Sep 2000
    Posts
    195
    I want to stop people who click to much on a button.
    I tryed disabling the button in the code so users can't click it. But while it grayed out they can click and when the button becomes able again the click will take effect.
    Any ideas?

    sample code
    Code:
    Private Sub cmdstart_Click()
    Dim retval As String
    Dim hApp As Long
       
    cmdstart.Enabled = False
    cmdRUN.Enabled = False
    
    If IsApplicationRunning("c:\poop.exe") Then
       CloseApp
       sleep 5000   
       cmdstart.Caption = "Start"
       cmdstart.Enabled = True
       cmdRUN.Enabled = True
    
    Else
       Call cmdRun_Click
       sleep 5000   
       cmdstart.Caption = "Stop"
    End If
    End Sub
    (This button just turns an app on and on).


    [Edited by AmmerBow on 09-18-2000 at 03:54 PM]

  2. #2
    Guest
    Try this:

    Code:
    Dim dclicked As Integer
    
    Private Sub Form_Load()
    dclicked = 0
    End Sub
    
    Private Sub Command1_Click()
    dclicked = dclicked + 1
    If dclicked = 2 Then
    Msgbox "You clicked already! NO MORE!", vbCritical
    End If
    End Sub

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