Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / August 2005

Tip: Looking for answers? Try searching our database.

How to delete an event?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gebbi - 31 Aug 2005 15:49 GMT
Hi all,

I have a little program written in C#. I got two forms. On the first
one there is a button with an event, which opens the second form and
hides itself. On this second form there is a button (on the same
position as on the first form).

When I click the button on the first form two times accidentally, the
event will be fired in the second form after it is loaded. Is it
possible to delete all previous events before a form is ready?

Thanks for your help!
Ginny Caughey [MVP] - 31 Aug 2005 16:44 GMT
Gebbi,

Probably the easiest way to prevent double-clicking a button is to disable
the button in its Click event handler, then re-enable it when you want it to
be active again. For example, you might want to disable the button on the
second form until you are ready to start receiving Click events by setting
the Enabled property to false in the form designer, then setting it to true
in your FormLoad event handler. Or disable the button on the first form
after it has been clicked once. Without seeing your app, I'm only guessing
what would be the best strategy for you.

Ginny Caughey
.NET Compact Framework MVP

> Hi all,
>
[quoted text clipped - 8 lines]
>
> Thanks for your help!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.