0

with the vb.net default color dialogbox

how can you handle the cancel buttons click event ?

if the cancel button is clicked, i dont want it to make any changes with the selected color. as of now if i click cancel it still edits the colors.

thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by jlego
0

Made changes only Ok button is clicked

'Ignore the changes, if cancel button is clicked
    If ColorDialog.ShowDialog() = DialogResult.OK Then
        'Do some changes
    End If

or

If ColorDialog.ShowDialog() = DialogResult.OK Then
        'Process Ok button event
    ElseIf  ColorDialog.ShowDialog() = DialogResult.Cancel Then
        'Process Cancel button event
    End If

Edited by selvaganapathy: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.