MM.exe fails to set already running MP instance to become the foreground window

Discussion in '1.0 RC4 and SVN Builds' started by jenz, December 12, 2008.

  1. jenz

    jenz New Member

    Joined:
    February 27, 2007
    Messages:
    9
    Likes Received:
    0
    Location:
    Zürich
    Ratings:
    +0 / 0
    Home Country:
    Switzerland Switzerland
    TV-Server Version: -
    MediaPortal Version: 1rc4
    MediaPortal Skin: Blue3
    Windows Version: Vista x64 SP1
    CPU Type: E6600
    HDD: Samsung F1 1T
    Memory: 4G
    Motherboard: Asus P5W DH Deluxe
    Video Card: ATI 1900 XT
    Video Card Driver: Catalyst 8.11
    Sound Card: x-Fi Extreme Gamer, Realtek ALC882
    Sound Card AC3: -
    Sound Card Driver: Creative 2.18.004, Realtek ??
    1. TV Card: None
    1. TV Card Type: -
    1. TV Card Driver: -
    2. TV Card: None
    2. TV Card Type: -
    2. TV Card Driver: -
    3. TV Card: None
    3. TV Card Type: -
    3. TV Card Driver: -
    4. TV Card: None
    4. TV Card Type: -
    4. TV Card Driver: -
    MPEG2 Video Codec: MP default
    MPEG2 Audio Codec: MP default
    h.264 Video Codec: FFMpeg
    Satelite/CableTV Provider: CableCom
    HTPC Case: -
    Cooling: Some fans
    Power Supply: BeQuiet Dark Power Pro 530W
    Remote: MCE Remote / IR-Server
    TV: Elsa CTR 22"
    TV - HTPC Connection: D-Sub

    Hi,



    I have a dual monitor config (LCD with keyboard and for the secondary display a CRT with gamepads in front of a sofa. IR Server /MCE Remote is used to control MP, and by pressing the Windows Start button MP starts on the secondary monitor. MP is never minimised. That part and MP itself works very well.

    Now after doing stuff on the primary screen (causing window focus to change) and then starting MediaPortal.exe again while MP is already visible, the already runing MP instance is activated but fails to get the focus. Instead its taskbar button is just blinking.

    This is probably caused by not calling allowSetforegroundwindow() in MediaPortalApp.ActivatePreviousInstance() or MediaPortalApp.SetForeGround().

    I haven't tested this by building MP itself, but when I use ChangeDisplaySettings.exe (SourceForge.net: ChangeDisplaySettings , build required) to call allowSetForegroundWindow() and execute mp.exe the already running instance of MP is becoming the foreground window instantly.

    Cheers, Jenz
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. jenz

    jenz New Member

    Joined:
    February 27, 2007
    Messages:
    9
    Likes Received:
    0
    Location:
    Zürich
    Ratings:
    +0 / 0
    Home Country:
    Switzerland Switzerland
    Problem solved

    It toook me a time to realize the problem. It's caused by using IR-Server Suite to launch MP. Because IRSS might not have the right to set the foreground window, MP also won't be able to become the foreground window.

    Solution: here in this IRSS thread

    Cheers, Jens
     
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!