views:

37

answers:

1

i create my own dialog form with two buttons (ok, cancel) and checked list box. i want to get all selected strings in first form which shown second form. for that purpose i do function GetSelected which return CheckedIndices->GetEnumerator() of my list box. now i want to deselect all strings on pressed cancel button. And deselect all strings on close form by pressing X in corner of form. how to track click the X?

+1  A: 

how to track click the X?

You can use the FormClosed or FormClosing event

Thomas Levesque
Please help. When i am launch Close() function generate both of that events. When i press X generate both of that events. For example i want when i prees btnOK button one function calling, when i press btnCancel or X second function calling. It do with delegates?
Xaver