Results 1 to 9 of 9

Thread: Key Stroke Help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Key Stroke Help

    I hope I am in the right forum. I was wondering anyone could help me make VB.NET 2008 Do the following Key stroke: Windows Key+Alt+Enter
    Can Anyone Help Me? I am trying to get it to Open MCE.


    Thanks Matchlighter
    Last edited by Matchlighter; Nov 16th, 2009 at 06:43 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Key Stroke Help

    Do you want this to happen only when your app has focus or any time?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Key Stroke Help

    Anytime. I am trying to make my own MCE Remote with an Arduino Board and VB.NET. VB.NET being the interpreter and Computer side command executor

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Key Stroke Help

    You'll need to use the RegisterHotkey API, which tells Windows to notify your app whenever a specific key combination is pressed. There are examples about, including one in the VB.NET CodeBank forum I believe, so you should check them out.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Key Stroke Help

    I'm not sure you understand. I don't need VB.NET to read the strokes. I need it to perform the strokes.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Key Stroke Help

    Ah, sorry. In that case you might want to look at the SendInput API. In theory you could use SendKeys.Send but I'm not sure that that supports the Windows key and it does have some limitations too.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Key Stroke Help

    How Do I use SendInput API? I'm sorry, but I'm really new to VB.NET.

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Key Stroke Help

    I've never used it myself. If I wanted to know how I'd search for existing examples. You can do the same. You can always post back if you have trouble but when someone gives you key words, the first thing to do is search.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Key Stroke Help

    I searched it but didn't understand it. Do you know if there is an easy way to start an application? And Can SendInput Send Its input directly into the system? From what i found it looks like it only does other programs.

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