home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 73 / IOPROG_73.ISO / tips / Flash e menu contestuali / FlashForm.cs < prev    next >
Encoding:
Text File  |  2003-07-31  |  1.0 KB  |  41 lines

  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. using AxShockwaveFlashObjects;
  5.  
  6. namespace FlashTest
  7. {
  8.     public class FlashForm  : System.Windows.Forms.Form
  9.     {
  10.  
  11.         private AxShockwaveFlash flashControl;
  12.  
  13.         public FlashForm ()
  14.         {
  15.             this.Text = "FlashTest";
  16.             this.Size = new Size(500,400);
  17.             this.Load += new EventHandler(this.myWindow_Load);
  18.  
  19.             // crea il controllo flash e lo aggiung al form
  20.             this.flashControl = new AxShockwaveFlash();
  21.             this.flashControl.Location = new Point(10,10);
  22.             this.flashControl.Size = new Size(300,300);
  23.             this.Controls.Add(this.flashControl);
  24.  
  25.         }
  26.  
  27.         public void myWindow_Load(object sender,EventArgs e)
  28.         {
  29.             // Carica il filmato flash
  30.             // Per un corretto funzionamento caricare il filmato
  31.             // sempre sull'evento Load del form o successivamente
  32.             // e mai nel costruttore
  33.             this.flashControl.Movie = System.IO.Path.Combine(Application.StartupPath,"Login.swf");
  34.         }
  35.  
  36.         public static void Main()
  37.         {
  38.             Application.Run(new FlashForm());
  39.         }
  40.     }
  41. }