Problem implementing Top and Child Forms with UpdateLayeredWindow with Win Froms
In a form I have implemented an UpdateLayeredWindow to dispaly the backgroundimage nicely and smoothly. After this, I could also show my controls using control.DrawTobitmap() and that also works. But any event is not fired on any control.
 
  After lots of googling I found that UpdateLayeredwindow (ULW) can't receive WM_PAINT events. The solution to this is to make another Top level window and add controls to it and keep the ULW at the child level. I can't make out how to do this. Can anyone help me with this ? Basic point will be my top level for mwill have all controls and child level will have the background image. How to implement this ?
 
  I tried this :

        public partial class ControlsForm : Form
    {
        private Form2 imageForm;

        public ControlsForm()
        {
            InitializeComponent();

            if (this.Site == null || this.Site.DesignMode == false)
            {
                imageForm = new Form2();
                ArrayList tempList = new ArrayList(this.Controls.Count);    // list of child controls
                foreach (Control c in this.Controls)
                    tempList.Add(c);

                foreach (Control c in tempList)
                {
                    this.Controls.Remove(c);
                    this.imageForm.Controls.Add(c); // reassign the parent form
                }

                this.Controls.Clear();
                this.AddOwnedForm(this.imageForm);
                // BackColor
                // Transparency KEy
                //imageForm.BackColor = Color.Magenta;
                //imageForm.TransparencyKey = Color.Magenta;

                this.imageForm.Show();
                this.SendToBack();
                imageForm.BringToFront();
                imageForm.Bounds = this.Bounds;
                // Bounds
                imageForm.ShowInTaskbar = false;
                //imageForm is already Border less
                this.FormBorderStyle = FormBorderStyle.None;
            }
        }
    }

The results as per the code : I just see an empty ControlForm with a rectangle and BackColor as Control.
  
 
If I uncomment the imageForm.BackColor & TransparencyKey code, then I can first see the image for a click of sec and then ControlForm with components on it of Magenta color checkbox. ControlForm has a checkbox, textfield & a button.
 
Can anyone point me where am I going wrong ?

Problem implementing Top and Child Forms with UpdateLayeredWindow with Win Froms
===

In a form I have implemented an UpdateLayeredWindow to dispaly the backgroundimage nicely and smoothly. After this, I could also show my controls using control.DrawTobitmap() and that also works. But any event is not fired on any control.
 
  After lots of googling I found that UpdateLayeredwindow (ULW) can't receive WM_PAINT events. The solution to this is to make another Top level window and add controls to it and keep the ULW at the child level. I can't make out how to do this. Can anyone help me with this ? Basic point will be my top level for mwill have all controls and child level will have the background image. How to implement this ?
 
  I tried this :

        public partial class ControlsForm : Form
    {
        private Form2 imageForm;

        public ControlsForm()
        {
            InitializeComponent();

            if (this.Site == null || this.Site.DesignMode == false)
            {
                imageForm = new Form2();
                ArrayList tempList = new ArrayList(this.Controls.Count);    // list of child controls
                foreach (Control c in this.Controls)
                    tempList.Add(c);

                foreach (Control c in tempList)
                {
                    this.Controls.Remove(c);
                    this.imageForm.Controls.Add(c); // reassign the parent form
                }

                this.Controls.Clear();
                this.AddOwnedForm(this.imageForm);
                // BackColor
                // Transparency KEy
                //imageForm.BackColor = Color.Magenta;
                //imageForm.TransparencyKey = Color.Magenta;

                this.imageForm.Show();
                this.SendToBack();
                imageForm.BringToFront();
                imageForm.Bounds = this.Bounds;
                // Bounds
                imageForm.ShowInTaskbar = false;
                //imageForm is already Border less
                this.FormBorderStyle = FormBorderStyle.None;
            }
        }
    }

The results as per the code : I just see an empty ControlForm with a rectangle and BackColor as Control.
  
 
If I uncomment the imageForm.BackColor & TransparencyKey code, then I can first see the image for a click of sec and then ControlForm with components on it of Magenta color checkbox. ControlForm has a checkbox, textfield & a button.
 
Can anyone point me where am I going wrong ?
