Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. dynamically add Flash C# application

dynamically add Flash C# application

Scheduled Pinned Locked Moved C#
csharpadobehelptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zap Man
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • Z Zap Man

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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.

      Z 2 Replies Last reply
      0
      • C Christian Graus

        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.

        Z Offline
        Z Offline
        Zap Man
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • C Christian Graus

          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.

          Z Offline
          Z Offline
          Zap Man
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups