Results 1 to 4 of 4

Thread: button cancel

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    panama
    Posts
    57

    Post

    running once aplication the program if disable for the process and function and not permited accesing the button of cancel process ejm:


    button ok - button cancel - button exit

    press button ok not permited press the button cancel and exit only the finish of the process how mantraince activate the button when runnig process


    thank



    ------------------
    capv

  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    I don't understand your question. Do you mean this:

    Code:
    Private Sub Form_Unload(Cancel As Integer)
        If MsgBox("Are you sure you want to quit?", vbYesNo, "Quit") = vbNo Then Cancel = True
    End Sub
    ??

    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470 Add Me ICQ Me
    AIM: TomY10
    PERL, JavaScript and VB Programmer

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    panama
    Posts
    57

    Post

    not, create command button and press one this button processing your function and not permited accesing the form ant other command button the image of the form is locked to finish of processing

    who mantaince active other command button when procesing somewere other command button

    ------------------
    capv

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Do you mean when you start a Function you can't access the other Buttons until it's Finished Processing?

    If so, insert a call to DoEvents in your Function, eg.
    Code:
    Private Sub cmdStop_Click()
        cmdStop.Tag = "X"
    End Sub
    
    Private Sub cmdStart_Click()
        Dim iCount As Long
        cmdStop.Tag = ""
        While Len(cmdStop.Tag) = 0
            iCount = iCount + 1
            Caption = iCount
            DoEvents
        Wend
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

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