Mouse lost when opening an embedded Windows form (1 Viewer)

RalphFFM

Portal Member
January 11, 2015
5
0
66
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?
 

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    You could use a
    Code:
    [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
    public static extern int ShowCursor(bool bShow);
    
    while (ShowCursor(true) < 0) ;

    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...
     

    RalphFFM

    Portal Member
    January 11, 2015
    5
    0
    66
    Home Country
    Germany Germany
    Thanks, that did the trick!
    My mouse is back.
    I'll try it out in detail tomorrow.
     

    Users who are viewing this thread

    Top Bottom