CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Posts
    2

    sending mouse clicks to specified position upon receiving keyboard input

    Hey there,
    Basicly i am trying to make an application using VB.NET 2005 which Sends a mouse click to any given position ( even if its not in my application's area) upon pressing the SPACE keyStroke.
    the bad thing is it works for 1 iteration :/
    i mean when the click is outside the application's area, the application becomes minimized so when i HIT SPACE key again the input wont be sent to my application to make it send another click:/
    how can i always make sure that my Keystroke will reach my application even if it is not ON TOP, i dont mind if there is a way to keep it always on top i only want to use my keystroke as many times i want ...
    i tried


    Me.TopMost = True

    it does keep it in the foreground but not ACTIVE.
    any help is apreciated
    sorry for my bad english but i am very sleepy atm after hours of searching
    thanks

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: sending mouse clicks to specified position upon receiving keyboard input

    Lookup keyboard hooking, there are several articles and threads detailing this here on CG...

    Gremmy..
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  3. #3
    Join Date
    Nov 2008
    Posts
    2

    Re: sending mouse clicks to specified position upon receiving keyboard input

    I am still fighting it with no luck... i wish you could fire me up with some link it would be more helpful.
    thanks

  4. #4
    Join Date
    Dec 2005
    Location
    Waterloo ON
    Posts
    545

    Re: sending mouse clicks to specified position upon receiving keyboard input

    Quote Originally Posted by deadalous View Post
    I am still fighting it with no luck... i wish you could fire me up with some link it would be more helpful.
    thanks
    FYI
    http://www.codeguru.com/forum/showthread.php?p=1759011
    The difficulty is that you have no idea how difficult it is.

    .Net 3.5/VS 2008

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

Featured