0
此代碼在執行後將在窗口中打開Flash。有什麼辦法可以做到:點擊Flash(不添加任何按鈕)時,會發生任何事件?單擊Flash(.swf文件類型)後發生事件
private void Window_Loaded(object sender, RoutedEventArgs e)
{
string filePath = @"C:\Users\IBM\Desktop\snailrunner1.swf";
SWFFileHeader swfFile = new SWFFileHeader(filePath);
this.Width = swfFile.FrameSize.WidthInPixels;
this.Height = swfFile.FrameSize.HeightInPixels;
WindowsFormsHost host = new WindowsFormsHost();
FormFlashLibrary.FlashAxControl play = new FormFlashLibrary.FlashAxControl();
host.Child = play;
grdMain.Children.Add(host);
play.Width = (int) this.Width;
play.Height = (int) this.Height;
play.LoadMovie(filePath);
play.Play();
}
請解釋爲什麼添加按鈕? – Likurg 2012-04-17 06:37:10
我不添加任何按鈕。我的目標是:點擊閃光燈,發生一個沒有任何按鈕的事件。 – hakunabean 2012-04-17 06:42:44
我不明白你的問題,你把閃光燈放在哪裏? – Likurg 2012-04-17 06:50:54