CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Common Dialogs

  1. #1

    Common Dialogs

    How do I tell which button was pressed (Cancel or OK) on the Common Dialog?


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Common Dialogs

    Set CancelError = true and Err.NUmber will be set.
    Try this sample.
    Start a new project. Add this code to the Form_load event. Run it. Watch the results

    private Sub Form_Load()
    on error resume next
    CommonDialog1.CancelError = true
    CommonDialog1.ShowPrinter
    MsgBox Err.Number
    End
    End Sub




    John G

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

Featured