
How to detect Cancel from MS Common Dialog
#1
Posted 27 October 2010 - 02:49 PM
By use of an Activex component in a ProIV function, I'm using the MS Common Dialog to allow selection of a file on the host/network. It works fine but, when control returns to my function, I'm struggling to establish whether the action was cancelled by the Cancel button on the MS Common Dialog. Does anyone have any ideas how to detect a click of Cancel in this way?
Regards - Barrry
Environment: Proiv kernel 6.1.51.0-PR, VIP 6.1.38.0 on a Unix platform.
#2
Posted 05 November 2010 - 08:04 AM
Hello All
By use of an Activex component in a ProIV function, I'm using the MS Common Dialog to allow selection of a file on the host/network. It works fine but, when control returns to my function, I'm struggling to establish whether the action was cancelled by the Cancel button on the MS Common Dialog. Does anyone have any ideas how to detect a click of Cancel in this way?
Regards - Barrry
Environment: Proiv kernel 6.1.51.0-PR, VIP 6.1.38.0 on a Unix platform.
The FileName returned is empty when user cancels - if they click ok it has path\filename
of the poster and do not represent those of any organisation.
#3
Posted 25 November 2010 - 04:47 PM
The FileName returned is empty when user cancels - if they click ok it has path\filename
Thanks for your response Chris. I have already tried that approach but it won't work for me in this particular case as I need to default FileName to a specific value before presenting the Common Dialog box therefore FileName will never be empty even if the user cancels.
#4
Posted 29 November 2010 - 07:18 PM
The FileName returned is empty when user cancels - if they click ok it has path\filename
Thanks for your response Chris. I have already tried that approach but it won't work for me in this particular case as I need to default FileName to a specific value before presenting the Common Dialog box therefore FileName will never be empty even if the user cancels.
Oh well - you might get better access to the control if you write a VB wrapper for it...
of the poster and do not represent those of any organisation.
Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users