none
SendKeys.SendWait and selecting specific context menu choice "Play To" RRS feed

  • Question

  • In a console app, I'm using SendKeys.SendWait("+{F10}"); of a highlighted folder to access its context menu. Now, I'd like to programatically select a specific context menu choice. The selection I want doesn't have a letter shortcut. Is it still possible to access the selection? I can't simply use the arrow-key Send because the context menu order is not known. Specifically I want to access the DLNA "Play To" context menu selection on a Win7 machine.

    If this isn't possible, is there a way to programatically use a Process.Start() approach which is equivalent to calling "Play To" on a specific folder

     

     


    www.jensign.com
    Thursday, April 21, 2011 8:00 PM

Answers

  • DLNA is a specification, you need to ask the folks who implement the specification I guess. There are many, many DLNA software on Windows. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • Marked as answer by Jensigner Friday, April 22, 2011 12:52 AM
    Friday, April 22, 2011 12:28 AM

All replies

  • I suggest you to use the IContextMenu interface exposed by Shell to execute this command. You can dig around the shell programming forum to find examples on using the interface to automate explorer.exe.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Thursday, April 21, 2011 11:41 PM
  • I suggest you to use the IContextMenu interface exposed by Shell to execute this command. You can dig around the shell programming forum to find examples on using the interface to automate explorer.exe.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP


    Thanks. I assume that means dropping into Pinvoke. Do you know if there is (or will be) any .net api access into DLNA functionality?

     


    www.jensign.com
    Friday, April 22, 2011 12:21 AM
  • DLNA is a specification, you need to ask the folks who implement the specification I guess. There are many, many DLNA software on Windows. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • Marked as answer by Jensigner Friday, April 22, 2011 12:52 AM
    Friday, April 22, 2011 12:28 AM
  • Thanks again Sheng. Always hard to find the folks who really know the answers you want, and hard getting them to respond.

    My specific interest in this is for semi-automation of a C# app. I'm developing called OneShot:  http://www.jensign.com/OneShot  which helps to automate image creationg/file-saving for use with Win7 and Play To.

     


    www.jensign.com
    Friday, April 22, 2011 12:52 AM
  • Quote from http://ctp.social.msdn.microsoft.com/Forums/en-US/windowssideshow/thread/747e476c-04fc-4a74-88c3-38a08787f4d6

    you may need to build your own DLNA stack, as the one in Windows 7 does not expose any API



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, April 22, 2011 2:54 AM