Results 1 to 6 of 6

Thread: [2.0] Replace run menu with my program (global hooking??)

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    [2.0] Replace run menu with my program (global hooking??)

    I have created a replacement to the start->run dialog. I want to have it run instead of the regular run program whenever the user clicks the run menu or uses the key combination Windows + 'R'.

    I've got no clue how i'm supposed to go about this, any help would be greatly appreciated.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2.0] Replace run menu with my program (global hooking??)

    I guess it's undoable (new word)
    But you might want to post this qestion in the Application Deployment forum
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: [2.0] Replace run menu with my program (global hooking??)

    Hmm, sounds like i'm gonna have to do it the cheeky way. At the moment i've got a thread in a loop which looks for the 'run' window (it sleeps for a while in the loop of course!). If it finds it then it shows my main window and closes the run dialog. This isn't perfect since you still get the regular run menu flashing up, but i guess it'll have to do.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2.0] Replace run menu with my program (global hooking??)

    I'm not sure, but there might be other ways to do it...
    I mean, doesn't Windows fire an event when it opens a new dialog?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    Re: [2.0] Replace run menu with my program (global hooking??)

    It might be possible to use SetWindowHookEx to hook the WindowProc of the Start Menu, but don't have much experience using that particular API. You'll need to place your hook function in a (probably unmanaged -- c/c++) DLL and call SetWindowHookEx with WH_CALLWNDPROC and the handle to your DLL and a pointer to the function.

    Sorry I can't be of more help!
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  6. #6

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: [2.0] Replace run menu with my program (global hooking??)

    Thanks for the help. I've not worked with hooking DLL's before; it looks a bit over my head. The method i'm using now isn't too bad!
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width