PC Review


Reply
Thread Tools Rate Thread

avoid this.close to raise validating events ?

 
 
nico
Guest
Posts: n/a
 
      2nd Sep 2003
In a winform, I have a cancel button. When clicking on it,
I want the form to close without raising validation
events. So I'm calling this.close() in the click event;

I have set the CausesValidation property to false for the
button and for the form itself, but the validating events
are raised when calling this.close(). How can I avoid
that ??

Thanks for help !!

 
Reply With Quote
 
 
 
 
anon
Guest
Posts: n/a
 
      3rd Sep 2003
override the Close event, and "forget" to call base.Close
method. You may need to use the new keyword.


>-----Original Message-----
>In a winform, I have a cancel button. When clicking on

it,
>I want the form to close without raising validation
>events. So I'm calling this.close() in the click event;
>
>I have set the CausesValidation property to false for the
>button and for the form itself, but the validating events
>are raised when calling this.close(). How can I avoid
>that ??
>
>Thanks for help !!
>
>.
>

 
Reply With Quote
 
nico
Guest
Posts: n/a
 
      4th Sep 2003
OK, but how do I really close the winform in my overrided
function ?

>-----Original Message-----
>override the Close event, and "forget" to call base.Close
>method. You may need to use the new keyword.
>
>
>>-----Original Message-----
>>In a winform, I have a cancel button. When clicking on

>it,
>>I want the form to close without raising validation
>>events. So I'm calling this.close() in the click event;
>>
>>I have set the CausesValidation property to false for

the
>>button and for the form itself, but the validating

events
>>are raised when calling this.close(). How can I avoid
>>that ??
>>
>>Thanks for help !!
>>
>>.
>>

>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to raise predefined events raju Microsoft VB .NET 2 29th Aug 2006 01:14 PM
Any Method to Raise a Validating Event to other control? norton Microsoft VB .NET 5 1st Mar 2005 12:29 PM
Raise the events in VB 6.0 where the events are defined in VB.Net Rethish R Microsoft VB .NET 1 25th Nov 2004 11:15 AM
How to raise events programatically? asr Microsoft Dot NET 3 3rd Nov 2003 05:24 PM
Why don't events raise in Sub New? IcedCrow Microsoft VB .NET 2 19th Sep 2003 03:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 PM.