Results 1 to 8 of 8

Thread: [RESOLVED] command for start menu?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    Resolved [RESOLVED] command for start menu?

    Hello, I was directed here from another forum after i posted a question for help.. here it is:

    After purchasing my new pc last weekend, I had a choice between Vista and WinXP Media Center Edition. After reading a ton of reviews online, i decided to hold back on Vista, until spring-time anyway.
    So i fired up MCE, and start fiddeling around with the remote control that came with it (specialized for video playback, but has 3 programmable buttons on the top). It definitely is a nice add-on, but i need some assistance in programming it.

    Under the settings tab, I can input a command, pretty much anything "Run" in windows would execute. When the specified button is pushed on the remote, the command is executed. So simply typing in calc would open the MS Calculator, msnmsgr would open up MSN Messenger, etc.

    Whether it be an application opening, or as i've tried, as simple as "switching users" on my pc. I came across this command on google
    %windir%\System32\rundll32.exe user32.dll,LockWorkStation
    which allows me to "lock" my account with the push of a button on the remote.

    One of the most obvious controls, which i'm surprised the remote lacks, is the Windows key, or Ctrl+Esc (opening up the start menu)..

    I'm wondering if someone here could help me in possibly finding a command which would execute such a simple task?

    I have absolutely no experience in programming, so if this task isn't worth the trouble, please advise me kindly.
    Thank you

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: command for start menu?

    I'm not sure what you are asking.

    Do you want to know how to program your remote using VB?

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: command for start menu?

    The following code would open the Start menu. If you have VB6 installed you could compile that into an EXE and run that when the button on the remote control is pressed.
    Code:
    Private Declare Sub keybd_event Lib "user32.dll" ( _
        ByVal bVk As Byte, _
        ByVal bScan As Byte, _
        ByVal dwFlags As Long, _
        ByVal dwExtraInfo As Long _
    )
    
    Public Sub Main()
        Const VK_LWIN As Long = &H5B
        Const KEYEVENTF_KEYUP As Long = &H2
        keybd_event VK_LWIN, 0, 0, 0
        keybd_event VK_LWIN, 0, KEYEVENTF_KEYUP, 0
    End Sub
    Last edited by Joacim Andersson; Dec 20th, 2007 at 09:11 AM.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: command for start menu?

    Just in case you don't have VB, I've compiled the above mentioned code into an exe for you. People around here are usually a bit paranoid (with all right) about downloading EXE files, but I asure you that this exe only contains the above code and nothing else .
    Attached Files Attached Files

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: command for start menu?

    Quote Originally Posted by Joacim Andersson
    If you have VB6 installed you could compile that into an EXE and run that when the button on the remote control is pressed
    How would you do that?

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: command for start menu?

    Quote Originally Posted by Hack
    How would you do that?
    The Media Center handles it. It has a feature that allows you to specify which program that should run when you press one of the programmable remote control buttons.

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    Re: command for start menu?

    THANK YOU SO MUCH JOACIM ANDERSON!! you saved me a lot of trouble, since i do not have VB installed. THANK YOU

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: command for start menu?

    Glad you got it, and I learned a couple of things as well.

    If you consider this resolved, you could help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.

    Thank you.

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