Mouse lost when opening an embedded Windows form

Discussion in 'MediaPortal 1 Plugins' started by RalphFFM, February 1, 2015.

  1. RalphFFM

    RalphFFM Portal Member

    Joined:
    January 11, 2015
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Germany Germany
    Hello, I am having problems when opening a Windows form from my plugin. The Windows form is embedded in my DLL.
    I open the form with "ShowDialog()" after receiving a button click-event.
    This works fine except that the mouse is gone after displaying the window.



    If I open the window smaller than the screen size, the mouse is not visible on my window or on the MediaPortal plugin window below it.

    I have tried setting the control's focus and have set the window to "TopMost" but these have no effect.

    I am running v: 1.10.0 using Titan skin.

    Any ideas?
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,836
    Likes Received:
    799
    Location:
    Nuenen
    Ratings:
    +1,168 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    You could use a
    Code (Text):
    1.  
    2. [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
    3. public static extern int ShowCursor(bool bShow);
    4.  
    5. while (ShowCursor(true) < 0) ;
    6.  
    Don't exactly know if that is the best solution, but it works for the browsetheweb plugin.

    You probably have to hide it again after you're done...
     
    • Thank You! Thank You! x 1
  4. RalphFFM

    RalphFFM Portal Member

    Joined:
    January 11, 2015
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Germany Germany
    Thanks, that did the trick!
    My mouse is back.
    I'll try it out in detail tomorrow.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!