Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Associating code with multiple events
Message
From
15/10/1998 06:27:53
 
 
To
13/10/1998 07:52:36
Jody Cairns
OAO Technology Solutions
Moncton, New Brunswick, Canada
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00146162
Message ID:
00147062
Views:
32
>I have a form with a couple of buttons and some labels on it. I have a popup menu associated with the form.
>
>I'd like to associate that popup menu with every control on the form, not just the form itself.
>
>Instead of manually adding the code using VB's editor to each control's MouseUp event, is their an easier way to associate similar events to one procedure?
>
>So, for each control on my form that has a MouseUp event, I want them all to do the same thing. Any way to do this besides the obvious way?
>
>I gues I'm looking to see if the form can capture the event mouse before the others controls mouse event.
>
>Thanks,
>
>jody


If your controls are all the same type (ex; TextBoxes), you can create an array of those controls. They will share the same events.
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform