Click here to Skip to main content
15,867,141 members
Home / Discussions / C#
   

C#

 
Generalchat Pin
keeper_corp2-Jan-04 10:07
keeper_corp2-Jan-04 10:07 
GeneralRe: chat(Modified) Pin
Mazdak2-Jan-04 10:10
Mazdak2-Jan-04 10:10 
QuestionValue collections? Pin
Judah Gabriel Himango2-Jan-04 10:00
sponsorJudah Gabriel Himango2-Jan-04 10:00 
AnswerRe: Value collections? Pin
Heath Stewart2-Jan-04 10:14
protectorHeath Stewart2-Jan-04 10:14 
GeneralRe: Value collections? Pin
Judah Gabriel Himango2-Jan-04 11:02
sponsorJudah Gabriel Himango2-Jan-04 11:02 
Generalresponding to keydown event while my form is inactive Pin
amgad_fathy2-Jan-04 8:21
amgad_fathy2-Jan-04 8:21 
GeneralRe: responding to keydown event while my form is inactive Pin
Mazdak2-Jan-04 8:34
Mazdak2-Jan-04 8:34 
GeneralRe: responding to keydown event while my form is inactive Pin
Heath Stewart2-Jan-04 9:22
protectorHeath Stewart2-Jan-04 9:22 
Actually, this is conditional...

If you mean your entire application is not the active Window, then using a system hook is best.

If you mean that a dialog in your application has lot focus, but your application still has focus, then you should use an IMessageFilter and register it with Application.AddMessageFilter.

Using system hooks slows down the speed of the entire window manager because your program has to filter and process the necessary data. If you don't NEED to, don't do it.

Also, if you do use a system hook, make sure you unregister it before exiting your application, like in your main window's (i.e., the Form that was run with Application.Run) Close event handler, or better yet in the Dispose override, or before youe application's entry point (i.e., Main) exits.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: responding to keydown event while my form is inactive Pin
Mazdak2-Jan-04 10:07
Mazdak2-Jan-04 10:07 
GeneralPrinting in Different paper size Pin
IntegraSoft2-Jan-04 8:20
IntegraSoft2-Jan-04 8:20 
GeneralRe: Printing in Different paper size Pin
eggie52-Jan-04 8:26
eggie52-Jan-04 8:26 
GeneralRe: Printing in Different paper size Pin
IntegraSoft2-Jan-04 8:33
IntegraSoft2-Jan-04 8:33 
GeneralRe: Printing in Different paper size Pin
eggie52-Jan-04 8:39
eggie52-Jan-04 8:39 
GeneralRe: Printing in Different paper size Pin
Mazdak2-Jan-04 8:42
Mazdak2-Jan-04 8:42 
GeneralRe: Printing in Different paper size Pin
Heath Stewart2-Jan-04 9:18
protectorHeath Stewart2-Jan-04 9:18 
GeneralRe: Printing in Different paper size Pin
IntegraSoft2-Jan-04 9:25
IntegraSoft2-Jan-04 9:25 
GeneralRe: Printing in Different paper size Pin
Heath Stewart2-Jan-04 9:31
protectorHeath Stewart2-Jan-04 9:31 
GeneralRe: Printing in Different paper size Pin
IntegraSoft2-Jan-04 9:47
IntegraSoft2-Jan-04 9:47 
GeneralRe: Printing in Different paper size Pin
Heath Stewart2-Jan-04 10:08
protectorHeath Stewart2-Jan-04 10:08 
GeneralRe: Printing in Different paper size Pin
IntegraSoft2-Jan-04 10:18
IntegraSoft2-Jan-04 10:18 
GeneralRe: Printing in Different paper size Pin
Heath Stewart2-Jan-04 10:31
protectorHeath Stewart2-Jan-04 10:31 
GeneralRe: Printing in Different paper size Pin
IntegraSoft2-Jan-04 10:52
IntegraSoft2-Jan-04 10:52 
GeneralRe: Printing in Different paper size Pin
Heath Stewart2-Jan-04 11:00
protectorHeath Stewart2-Jan-04 11:00 
GeneralRichTextBox Pin
Luther Baker2-Jan-04 8:07
Luther Baker2-Jan-04 8:07 
GeneralRe: RichTextBox Pin
Heath Stewart2-Jan-04 9:15
protectorHeath Stewart2-Jan-04 9:15 

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.