// Function to destroy existing WizCtl and recreate it. // This is needed because WizCtl attempts to find, and connect to, a pad during construction // (so that it can initialize itself based on size of pad screen and also potentially resize its window to match). // If it fails to connect to a pad at that point it assumes there isn't one and any subsequent attempt to connect with PadConnect will fail. private void recreateWizCtl() { // Destroy the existing WizCtl WizCtl.Dispose(); // Now recreate it this.WizCtl = new Florentis.AxWizCtl(); this.WizCtl.Licence = "<<license>>"; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TestWizSigCapt)); ((System.ComponentModel.ISupportInitialize)(this.WizCtl)).BeginInit(); this.WizCtl.Enabled = true; this.WizCtl.Location = new System.Drawing.Point(340, 173); this.WizCtl.Name = "WizCtl"; this.WizCtl.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("WizCtl.OcxState"))); this.WizCtl.Size = new System.Drawing.Size(402, 242); this.WizCtl.TabIndex = 4; this.Controls.Add(this.WizCtl); // Make sure it's invisible so it doesn't appear on the monitor //this.WizCtl.Visible = false; }