Does anybody know how to get the MP Windowhandle within the plugin? (1 Viewer)

disaster123

MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Hi!

    I need an option to get the MP Windowhandle from within a plugin. Does anybody know how to get it - without using FindWindowEx or something like that?

    Stefan
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    Hi!

    I need an option to get the MP Windowhandle from within a plugin. Does anybody know how to get it - without using FindWindowEx or something like that?

    Stefan

    Have you tried...

    Process[] processes = Process.GetProcessesByName("MediaPortal");

    foreach (Process p in processes)

    {
    IntPtr pFoundWindow = p.MainWindowHandle;
    }
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Oh i'm sporry i forgot to say that i've solved it already. But there is a better way - when you use a plugin. You can use something like:

    Code:
    GUIWindow.form.Handle
     

    Users who are viewing this thread

    Similar threads

    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work. Spotify desktop app installed on same computer as you are going to use with MediaPortal Getting ready Create an app at spotify, use this link: Dashboard | Spotify for Developers, you have to login. Click...
    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work...
    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work...
    Replies
    0
    Views
    1K
    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select another. Moving Pictures scales down the high res pictures and shrinks the filesize as well so I can't just go to fanart or themoviedb and get the images without doing some extra work to get the file right...
    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select...
    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select...
    Replies
    0
    Views
    480
    Thank you! I guess I was overthinking it.
    Thank you! I guess I was overthinking it.
    This is apparently such a low level question that it's not even documented that I can find - I apologize in advance for this: I...
    Replies
    2
    Views
    620
    I tried setting the windows screensaver to power off the display on my MP1 HTPC but in fact it only blanks the screen ("no video signal") on the TV I suspect the AVR has something to do with that. If I manually put the TV only into standby when TV is playing but paused then on wakeup I could not immediately take it out of pause and...
    I tried setting the windows screensaver to power off the display on my MP1 HTPC but in fact it only blanks the screen ("no video...
    Hi all, I´m using MP 1.30 at the moment and have a problem which also exists on my system on previous versions. So I don´t think...
    Replies
    3
    Views
    876
    restarting is supported but depends on the reason why it failed. As an external tool try JDownloader.org - Official Homepage
    restarting is supported but depends on the reason why it failed. As an external tool try JDownloader.org - Official Homepage
    Earlier this year I changed my internet service provider from a landline (where I was consistently overcharged), to a mains-powered...
    Replies
    1
    Views
    628
    Top Bottom