简体   繁体   中英

Stop Firefox Flash from exiting full screen mode when focus leaves

Currently whenever I put a Flash window in full screen mode with firefox, as soon as focus leaves the Flash screen to my "always on top" form, flash immediately exits full screen mode! Even when I set my form to not show in the taskbar this occurs. Now there must be some way to get around this as a similar Java application that is always on top doesn't cause the flash player to exit full screen mode when focus is lost to the Java program.

Does anyone have any thoughts on how to avoid this behavior? Just a note, this doesn't occur in Chrome, just Firefox.

You could show the Form with no activation. This is possible with the Win32 Extended Window Style WS_EX_NOACTIVATE .

You have to override the CreateParams property of the Form to set this style:

protected override CreateParams CreateParams
{
    get
    {
       CreateParams cp = base.CreateParams;
       cp.ExStyle |= 0x08000000/*WS_EX_NOACTIVATE*/;
       return cp;
    }
}

But note that this style has some side effects for the form, eg during moving it isn't drawn anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM