dynamically add Flash C# application
-
I need to dynamically add a flash object to a C# desktop application. Could someone give me some overview on how to do this. I have been able to add it statically but when I go to try to create it dynamically I come up with unhandled win32 exceptions. Also I need the background to be transparent and having troubles with this too. Thanks for any help
-
I need to dynamically add a flash object to a C# desktop application. Could someone give me some overview on how to do this. I have been able to add it statically but when I go to try to create it dynamically I come up with unhandled win32 exceptions. Also I need the background to be transparent and having troubles with this too. Thanks for any help
A flash control is not going to draw itself transparently, ever. What do you mean by adding it dynamically ?
Christian Graus Driven to the arms of OSX by Vista.
-
A flash control is not going to draw itself transparently, ever. What do you mean by adding it dynamically ?
Christian Graus Driven to the arms of OSX by Vista.
I have a .skin file that the app reads and it needs to know what to load from there. The skin file is built through and editor which contains all the information that it needs to build the form. everything is working well except my flash. See I will never know the exact object or the ammount of objects that need to be loaded. some forms may have 1 flash object were others may have 3 or more or none. Since I will not know I cant go to the front of the form and add my flash object there it will need to be loaded in the back. like all my other controls. And Im not sure how to go about this. I've seen it done in vb so I'm sure I can do it in C#. the flash object is a circle and when pulling the shockwave flash control onto the form it makes a white box. setting this white box to transparent was also done in vb.
-
A flash control is not going to draw itself transparently, ever. What do you mean by adding it dynamically ?
Christian Graus Driven to the arms of OSX by Vista.
Heres what windows adds when you pull it into the form. private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HighCapacity)); this.timer1 = new System.Windows.Forms.Timer(this.components); this.myFlash = new AxShockwaveFlashObjects.AxShockwaveFlash(); ((System.ComponentModel.ISupportInitialize)(this.myFlash)).BeginInit(); this.SuspendLayout(); // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // myFlash // this.myFlash.Enabled = true; this.myFlash.Location = new System.Drawing.Point(39, 34); this.myFlash.Name = "myFlash"; this.myFlash.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("myFlash.OcxState"))); this.myFlash.Size = new System.Drawing.Size(192, 192); this.myFlash.TabIndex = 0; // // HighCapacity // this.ClientSize = new System.Drawing.Size(292, 266); this.Controls.Add(this.myFlash); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "HighCapacity"; this.TransparencyKey = System.Drawing.SystemColors.Control; this.Layout += new System.Windows.Forms.LayoutEventHandler(this.HighCapacity_Layout); ((System.ComponentModel.ISupportInitialize)(this.myFlash)).EndInit(); this.ResumeLayout(false); } I need to beable to load this dynamically. kinda like how I do this with a picture box foreach (object obj in sk.IMG) { imageButton = new PictureBox(); ImgButton imgBtn = (ImgButton)obj; arLocation = imgBtn.Location.Split(':'); arSize = imgBtn.Size.Split(':'); this.imageButton.Image = new Bitmap(imgBtn.PathOff); this.imageButton.Name = imgBtn.Name; this.imageButton.BackColor = Color.Transparent; this.imageButton.SizeMode = PictureBoxSizeMode.StretchImage; this.imageButton.Size = new Size(Convert.ToInt32(arSize[0]), Convert.ToInt32(arSize[1])); this.imageButton.Location = new Point(Convert.T