Rank: Member
Groups: Member
Joined: 7/11/2005(UTC) Posts: 4
|
In VB 6 How can I detect that the Cancel button has been pressed ? I need this to avoid loading an image if the user canceled the action :|
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Just check the returned Boolean value by FileDialog.ShowOpen method. It returns False when user pressed the Cancel button. Edited by user Tuesday, December 15, 2009 10:30:27 AM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Just want to add that the normal template for using this function would be something like this: Code:...
If FileDialog1.ShowOpen Then
BitmapViewer1.Bitmap.LoadFromFile FileDialog1.FileName
...
End If
...
Hope this helps. Edited by user Sunday, December 23, 2007 5:48:41 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/11/2005(UTC) Posts: 4
|
Thanks for the answer
It's working :D
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.