I'm having another issue, this time using the form version, FlashPlayerForm as a splash screen. The way I'm attempting to do this is as follows:
Code: Select all
public class SplashScreen : FlashPlayerControlLibrary.FlashPlayerForm {
public SplashScreen() {
if (!FlashPlayerControlLibrary.FlashPlayerForm.IsTransparentModeAvailable()) {
Console.WriteLine("Transparent mode is not available");
}
Stream movieStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("MyAssembly.SplashScreen.swf");
this.PutMovieFromStream(movieStream);
this.ShowInTaskbar = false;
this.Width = 485;
this.Height = 320;
this.Left = Screen.PrimaryScreen.WorkingArea.Width / 2 - this.Width / 2;
this.Top = Screen.PrimaryScreen.WorkingArea.Height / 2 - this.Height / 2;
this.TopMost = true;
this.BringToFront();
}
public void ShowSplash() {
start_time = Environment.TickCount;
this.Show();
this.FlashMethod_Play();
}
public void HideSplash() {
this.Hide();
}
}
Then, in the button click handler of a test application's button, I execute the following code:
Code: Select all
public void testButton_Click(object sender, System.EventArgs e) {
SplashScreen splash = new SplashScreen();
splash.ShowSplash();
}
... and to my surprise, nothing happens. I can see the splash form as a button in the taskbar if I get rid of "form.ShowInTaskBar = false" which means it's showing. I've tested that the splash movie is being successfully loaded from the resource file. If I use the exact same loading code for the control version, it works fine. I've also tested that the form bounds being passed to the form are ones that would be visible on the screen.
I have also tried a version where the FlashPlayerForm is created and initialised without the use of a SplashScreen subclass, and that doesn't work either.
What am I doing wrong?
As I have incorporated transparency into the splash screen, I can't replace it with a standard windows form containing the FlashPlayerControl - I need to use the FlashPlayerForm.
Kind regards,
Dave.