private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { // step2 ((Ready)this.stepPanel.Controls[0]).progressBar1.Value = 100; Agreement am = new Agreement(); SetWindowsTheme(am.richTextBox1.Handle); //SetWindowsTheme(am.label1.Handle); am.richTextBox1.AppendText( Properties.Resources.agreement); am.accept.Click += new EventHandler(accept_Click); am.cancel.Click += new EventHandler(cancel_Click); UserControl uc = (UserControl)this.stepPanel.Controls[0]; this.stepPanel.Controls.RemoveAt(0); this.stepPanel.Controls.Add(am); uc.Dispose(); //GlassText gt = new GlassText(); //gt.FillBlackRegion(am.CreateGraphics(), am.ClientRectangle); //gt.DrawTextOnGlass(am.Handle, am.label1.Text, am.label1.Font, am.label1.Bounds, 10); }