Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2003
    Posts
    17

    Grin Creating a close button

    I have created a close button on the top of my application and would like a window to appear that will give users the choice to either close the application or cancel the close request.

    I have placed the following actions on the button:

    %Result% = Dialog.MessageBox ("Close", "Do you want to close CPA into ...", Yes|No, Question)

    Application.Exit

    Unfortunately if you click "No" the application exits anyway.

    What do I need to add to the actions to get "no" to just close the dialog box?

    Thanks,

    Stuart Cargin

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Creating a close button

    You need to enclose the Application.exit action inside a CONDITIONAL > IF statement which tests the variable %Result% to see whether it contains the value "yes" or the value "no". So that way your application.exit action will only apply itself if the %result% variable contains the correct value, i.e. "yes".

    Check out the help files for help on creating and using an IF statement, real easy stuff, you can learn it in a few minutes... Think of IF statements as gateways which only allow items you specify to pass through.

    Also I just emailed you a .zip file with a working example you can check out, I sent it to your registration email address.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Aug 2003
    Posts
    17

    Re: Creating a close button

    Thanks Corey.

    Although I found the help file a little hard to follow, the file you e-mailed showed me where I went wrong.

    Thanks again,

    Stuart Cargin

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Creating a close button

    No probs, glad you got it.

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Aug 2003
    Posts
    7

    Re: Creating a close button

    Could I possibly get a copy of that file also?

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Creating a close button

    Just sent it to your hotmail address Ken...

    Corey Milner
    Creative Director, Indigo Rose Software

  7. #7
    Join Date
    Aug 2003
    Posts
    7

    Re: Creating a close button

    Thanks. I have done some VB so this was not totally new to me. Doing it in AMS just looked different. I figured it out before you sent the email, I am going to compare it to what you sent to me. Once again, Thanks

  8. #8
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Creating a close button

    Cheers.

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts