TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gustavo
NA
1.3k
454k
How Do I: Add a Control for a Form?
May 23 2010 11:44 AM
Hello:
I have a Class that adds Event Controls to all my Forms.
Now I would like to add a Control for the Form on other Events. Below is the code I have now.
How do I set up the Control for the Form at Load or other events?
Control
TheControl = TheForm.GetNextControl(
null
,
true
);
while
(TheControl !=
null
)
{
TheEvent = TheControl.GetType().Name;
switch
(TheEvent)
{
case
"Button"
:
TheControl.Enter +=
new
EventHandler
(ButtonEnter);
TheControl.Leave +=
new
EventHandler
(ButtonLeave);
TheControl.MouseHover +=
new
EventHandler
(TextBoxMouseHover);
TheControl.MouseLeave +=
new
EventHandler
(TextBoxMouseLeave);
break
;
case
"CheckBox"
:
...
Reply
Answers (
1
)
Delegate vs Event in c#
Windows Service not calling Web Service appropriately