Click here to Skip to main content
16,008,490 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dear Inheritance - A question for you Pin
Colin Angus Mackay10-Nov-05 13:29
Colin Angus Mackay10-Nov-05 13:29 
AnswerRe: Dear Inheritance - A question for you Pin
Robert Rohde10-Nov-05 20:51
Robert Rohde10-Nov-05 20:51 
QuestionTime Text Field Pin
charbelasmar10-Nov-05 5:46
charbelasmar10-Nov-05 5:46 
AnswerRe: Time Text Field Pin
Joshua Quick10-Nov-05 7:11
Joshua Quick10-Nov-05 7:11 
QuestionMouse Events Pin
rich_wenger10-Nov-05 3:54
rich_wenger10-Nov-05 3:54 
AnswerRe: Mouse Events Pin
Dan Neely10-Nov-05 4:54
Dan Neely10-Nov-05 4:54 
GeneralRe: Mouse Events Pin
rich_wenger10-Nov-05 5:08
rich_wenger10-Nov-05 5:08 
AnswerRe: Mouse Events Pin
Luis Alonso Ramos10-Nov-05 5:32
Luis Alonso Ramos10-Nov-05 5:32 
rich_wenger wrote:
how do I wire them to 'every' control on the form?
this.MouseMove +=new MouseEventHandler(Form1_MouseMove);
btnOK.MouseMove += new MouseEventHandler(Form1_MouseMove);
txtName.MouseMove += new MouseEventHandler(Form1_MouseMove);
chkRemember.MouseMove += new MouseEventHandler(Form1_MouseMove);
and so on. Or you could also do this:
foreach(Control ctl in this.Controls)
    ctl.MouseMove += new MouseEventHandler(Form1_MouseMove);
If you have controls inside other controls (panels or group boxes for example), you'll need to do that recursively. If you always use the same handler, the same routine will be called for events raised by any controls.

I hope this helps.

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
GeneralRe: Mouse Events Pin
Gulfraz Khan10-Nov-05 6:10
Gulfraz Khan10-Nov-05 6:10 
GeneralRe: Mouse Events Pin
rich_wenger10-Nov-05 6:15
rich_wenger10-Nov-05 6:15 
GeneralRe: Mouse Events Pin
rich_wenger11-Nov-05 5:53
rich_wenger11-Nov-05 5:53 
QuestionFrom designer, create a component passing parameters Pin
monteiz10-Nov-05 3:36
monteiz10-Nov-05 3:36 
AnswerRe: From designer, create a component passing parameters Pin
monteiz10-Nov-05 4:01
monteiz10-Nov-05 4:01 
QuestionTextbox Pin
PaulaM10-Nov-05 2:50
PaulaM10-Nov-05 2:50 
AnswerRe: Textbox Pin
S. Senthil Kumar10-Nov-05 3:48
S. Senthil Kumar10-Nov-05 3:48 
AnswerRe: Textbox Pin
Gulfraz Khan10-Nov-05 6:17
Gulfraz Khan10-Nov-05 6:17 
AnswerRe: Textbox Pin
Craig G Fraser10-Nov-05 22:23
Craig G Fraser10-Nov-05 22:23 
Questionc# and xml Pin
ginopilotino8210-Nov-05 2:11
ginopilotino8210-Nov-05 2:11 
AnswerRe: c# and xml Pin
S. Senthil Kumar10-Nov-05 4:08
S. Senthil Kumar10-Nov-05 4:08 
GeneralRe: c# and xml Pin
ginopilotino8210-Nov-05 4:49
ginopilotino8210-Nov-05 4:49 
GeneralRe: c# and xml Pin
S. Senthil Kumar10-Nov-05 5:25
S. Senthil Kumar10-Nov-05 5:25 
GeneralRe: c# and xml Pin
ginopilotino8210-Nov-05 5:48
ginopilotino8210-Nov-05 5:48 
QuestionShow more than one row on the datagrid's Footer Pin
Fendefa10-Nov-05 1:51
Fendefa10-Nov-05 1:51 
QuestionLocating App path Pin
Mark0610-Nov-05 1:50
Mark0610-Nov-05 1:50 
AnswerRe: Locating App path Pin
S. Senthil Kumar10-Nov-05 3:44
S. Senthil Kumar10-Nov-05 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.