rvictor Posted December 17, 2007 Share Posted December 17, 2007 Perhaps this should be obvious, but unfortunately it isn't. I've got the following lines of code and would like to differentiate between the user pressing the Cancel button vs. clicking on the Close "X" in the upper right corner. Is this possible? $Folder = FileSelectFolder($Task, '', 2, $LastFolder) ;Open folder select dialog If @error Then Exit I like to do something like if cancel then main menu if close then end program Thanks, Dick Link to comment Share on other sites More sharing options...
Squirrely1 Posted December 17, 2007 Share Posted December 17, 2007 Within this context of the FileSelectFolder() dialog, to close the dialog is equivalent to clicking the "Cancel" button, no folder was selected and the only thing that happened is that somebody decided not to select a folder. It would be bad practise to go against this convention. You should adopt a new strategy to handle your task. Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
rvictor Posted December 18, 2007 Author Share Posted December 18, 2007 Within this context of the FileSelectFolder() dialog, to close the dialog is equivalent to clicking the "Cancel" button, no folder was selected and the only thing that happened is that somebody decided not to select a folder. It would be bad practise to go against this convention. You should adopt a new strategy to handle your task. OK, thanks. I can send them back to the main menu from which they can exit the program, but it had seemed to me that in most cases one would expect to exit the program by clicking the X in the upper right and I was trying to respect that expectation. In rethinking that assumption and looking at the operation of some commercial software, it appears that I was incorrect.Thanks for the clarification and for causing me to think further than I had.Dick Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now