c# - Detect system wide scrolling in Console application -


i wondering how make console application detects if user scrolls mousewheel (anywhere on screen).

the reason want console application can run in background. i've searched quite bit , can't seem find need.

you may read topic:

mouse wheel event (c#)

if have own controls, can setup such things throught designer, or in code dynamically. however, mouse needs on top of control, receive event. in case need register on message filter. take care, not in there. may slow down whole application, if @ place:

public bool prefiltermessage(ref message m)  

you can setup windows forms project without showing form either. here program.cs code of windows forms project:

static class program {     /// <summary>     /// main entry point application.     /// </summary>     [stathread]     static void main()     {         application.enablevisualstyles();         application.setcompatibletextrenderingdefault(false);         application.run(new windowlessapplicationcontext());      } }  /// <summary> /// window less application context. /// </summary> internal class windowlessapplicationcontext : applicationcontext {     /// <summary>     /// standard constructor.     /// </summary>     public windowlessapplicationcontext()     {         try         {             //your code          }         // mayy add catch here                 {             //close process             environment.exit(0);         }     } } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -