PC Review


Reply
Thread Tools Rate Thread

adding event handlers for windows controls

 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      22nd Apr 2004
From the Form designer with the Property pane visible, click the Events
button (lightning strike). This will show the supported events on the
selected control. You can double click a blank event here and have the
method created and hooked up for you.

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org

"Joanne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there an easy / automatic way to add new events & handlers to a C# CF
> app
> form designer?
>
> If I double click on a control in the form designer it will open the code
> window and automatically add the event handler and delegate but only for
> the
> default control event. Is there a way I can force VS to create other
> events
> such as the key down event without having to add it manually?
>
> Thanks
> Joanne
>
>



 
Reply With Quote
 
 
 
 
Joanne
Guest
Posts: n/a
 
      22nd Apr 2004
Is there an easy / automatic way to add new events & handlers to a C# CF app
form designer?

If I double click on a control in the form designer it will open the code
window and automatically add the event handler and delegate but only for the
default control event. Is there a way I can force VS to create other events
such as the key down event without having to add it manually?

Thanks
Joanne


 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      22nd Apr 2004
Joanne:

In VB.NET, you can click on the combo box in the upper right hand corner of
the app and it will list them for you. In C# you need to go into the
properties window and look for the yellow lightning bolt. In both places
you'll find a list of available events.

Also note that you may be able to add handlers for many events b/c they
inherit from Control. HOwever, just b/c those events are there and compile,
that doesn't mean they'll actually fire. The click event of a label
coontrol comes to mind.

HTH,

Bill
"Joanne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there an easy / automatic way to add new events & handlers to a C# CF

app
> form designer?
>
> If I double click on a control in the form designer it will open the code
> window and automatically add the event handler and delegate but only for

the
> default control event. Is there a way I can force VS to create other

events
> such as the key down event without having to add it manually?
>
> Thanks
> Joanne
>
>



 
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
Event handlers on nested custom controls in WPF sundarvenkata Microsoft Dot NET 0 31st May 2009 12:52 PM
Adding Event Handlers to Inherited Controls stuppi Microsoft Dot NET Framework Forms 1 21st Dec 2007 11:50 AM
Need help with adding Controls and event handlers at runtime martin.zackrisson@gmail.com Microsoft Excel Programming 0 27th Dec 2006 04:36 PM
Need help with adding Controls and event handlers at runtime martin.zackrisson@gmail.com Microsoft Excel Programming 0 27th Dec 2006 04:36 PM
How do you add event handlers for controls generated with xsl? MikeC Microsoft C# .NET 0 5th Jan 2004 09:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:59 AM.