Does anybody know how to get the MP Windowhandle within the plugin? (2 Viewers)

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

    When I rebooted this morning, the same problem came back. But I did find my error, it turned out I had accidently clicked on "Filtering: On startup filter by: Unwatched Movies" in "Moving Pictures Configuration". Don't know how I did that. (n)
    When I rebooted this morning, the same problem came back. But I did find my error, it turned out I had accidently clicked on...
    About a 2 months ago I was having problems with filtering for unwatched movies. I couldn't find the filter for it. So I tried...
    Replies
    3
    Views
    454
    that really sounds like an authorization issue. do you already have an OpenSubtitlesConfiguration.xml in the programfiles\tean mediaportal\subtitledownloaders folder? there you can fill in your credentials. I'm sure it is documented somewhere...
    that really sounds like an authorization issue. do you already have an OpenSubtitlesConfiguration.xml in the programfiles\tean...
    I'm having a strange issue with Subcentral & Subtitle Downloader. Everytime I try to download subtitles the list come out empty...
    Replies
    3
    Views
    523
    I think therein lies my problem. I am on 1.6.2.0. So thanks both for your help, I will pause this thread for now and come back to it while I work out what to do next. The problem is we have a family member who relies on MiniDisplay and I don't know if upgrading the set up is going to spoil compatibility with that plug in. The set up...
    I think therein lies my problem. I am on 1.6.2.0. So thanks both for your help, I will pause this thread for now and come back to...
    Good afternoon, Does anybody know of an expression or property I can use within a conditional visibility statement, that detects...
    Replies
    28
    Views
    7K
    Got a reply from SD ... "Looks like your last successful download was on 5/23. On 5/24 for some reason we received 194 connections between 10:54 and 11:05 triggering a denial of service attack ban. The logs show it was lifted on 5/25, but I still see the entry in iptables. I reset fail2ban and hopefully you're working again." Weird...
    Got a reply from SD ... "Looks like your last successful download was on 5/23. On 5/24 for some reason we received 194...
    I'm using MediaPortal 1.38.1 x64 and have an SD-DD lineup account. In the last week, I have not been able to update my EPG, and...
    Replies
    3
    Views
    686
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    946
    Top Bottom