PC Review


Reply
Thread Tools Rate Thread

Closing event executed twice

 
 
Lcubed
Guest
Posts: n/a
 
      12th Jun 2009
Using .NET CF 2.0 and C#, I inadvertently discovered that the closing
event is executing twice for my forms.
Does anyone know what would cause this and/or how to stop it? Thanks
for any suggestions!
 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      12th Jun 2009
You've hooked it twice maybe?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"Lcubed" <(E-Mail Removed)> wrote in message
news:96fc3940-637c-4d86-b8c0-(E-Mail Removed)...
> Using .NET CF 2.0 and C#, I inadvertently discovered that the closing
> event is executing twice for my forms.
> Does anyone know what would cause this and/or how to stop it? Thanks
> for any suggestions!



 
Reply With Quote
 
Lcubed
Guest
Posts: n/a
 
      12th Jun 2009
Yep. That's it. Just couldn't figure out how until I discovered that
setting the DialogResult also closes the form.

so doing something like this:

this.DialogResult = DialogResult.OK;
this.Close();

Sends the close twice. Interesting.

Thanks!

On Jun 12, 4:09*pm, "Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com>
wrote:
> You've hooked it twice maybe?
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded communityhttp://community.OpenNETCF.com
>
> "Lcubed" <Loris.Email...@gmail.com> wrote in message
>
> news:96fc3940-637c-4d86-b8c0-(E-Mail Removed)...
>
> > Using .NET CF 2.0 and C#, I inadvertently discovered that the closing
> > event is executing twice for my forms.
> > Does anyone know what would cause this and/or how to stop it? Thanks
> > for any suggestions!


 
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
When closing an executed application, my program is in background sewid Microsoft VB .NET 1 14th Jan 2008 02:57 PM
Cmd Button Click event not executed LDD Microsoft VB .NET 3 21st Dec 2005 06:49 PM
Are event callback delegates executed executed in a separate thread???? Bob Rock Microsoft C# .NET 4 15th Jul 2004 11:30 AM
Event executed twice Alberto Microsoft ASP .NET 1 12th Jan 2004 04:51 PM
Help with SQL executed through form event... Jason M Canady Microsoft Access Queries 1 30th Nov 2003 01:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:43 AM.