Components Not Visible At Runtime

Wizard for Windows Forms Forum

Posted 18 years ago by Rommel Edwards
Avatar
Hey List,

I upgraded to V3 and I had to make some code changes. Now I can see the components (textboxes, labels, etc) at design time, but they disappear at runtime.

Here's some code:

Public Class frmMain
Inherits System.Windows.Forms.Form

[blah, blah, blah]
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

'
Me.Wizard1.BackButtonBackColor = System.Drawing.SystemColors.Control
Me.Wizard1.ButtonFlatStyle = System.Windows.Forms.FlatStyle.System
Me.Wizard1.CancelButtonBackColor = System.Drawing.SystemColors.Control
Me.Wizard1.CausesValidation = False
Me.Wizard1.Pages.Add(Me.WizardPage1)
Me.Wizard1.Pages.Add(Me.WizardPage2)
Me.Wizard1.Pages.Add(Me.WizardPage3)
Me.Wizard1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Wizard1.FinishButtonBackColor = System.Drawing.SystemColors.Control
Me.Wizard1.FormAcceptButton = ActiproSoftware.Wizard.WizardAcceptButtonDefault.FinishThenNext
Me.Wizard1.FormCancelButton = ActiproSoftware.Wizard.WizardCancelButtonDefault.Cancel

'I commented out this line because it generated syntax errors
'Me.Wizard1.HeaderImage = CType(resources.GetObject("Wizard1.HeaderImage"), System.Drawing.Image)

Me.Wizard1.HelpButtonBackColor = System.Drawing.SystemColors.Control
Me.Wizard1.Location = New System.Drawing.Point(0, 0)
Me.Wizard1.Name = "Wizard1"
Me.Wizard1.NextButtonBackColor = System.Drawing.SystemColors.Control

'I commented out this line because it generated syntax errors
'Me.Wizard1.PageCaptionFont = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))


'I commented out this line because it generated syntax errors
'Me.Wizard1.PageDescriptionFont = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Wizard1.Pages.AddRange(New ActiproSoftware.Wizard.WizardPage() {Me.WizardPage1, Me.WizardPage2, Me.WizardPage3})
Me.Wizard1.Size = New System.Drawing.Size(562, 376)
Me.Wizard1.TabIndex = 0

[blah, blah]
End Sub


I also commented out the code for the AfterPageSelect() event since that event no longer exists in V3. I made no further code changes. What am I missing?

Thanks.

Comments (2)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rommel,

Make sure you check out the documentation topic "Converting from Version 2.0 to 3.0". That details out everything that you need to do to upgrade from 2.0 to 3.0. Please start your conversion over and follow that step by step and if you still have issues, let us know and we can help further.


Actipro Software Support

Posted 18 years ago by Rommel Edwards
Avatar
Hi again,

I've followed the steps in the documentation and still got the problem. Then I spotted something:

As instructed by the documentation, I changed the Me.Wizard1.Controls.Add(WizardPageX) lines to:

Me.Wizard1.Pages.Add(Me.WizardPage1)
Me.Wizard1.Pages.Add(Me.WizardPage2)
Me.Wizard1.Pages.Add(Me.WizardPage3)

However, when I looked a few lines down in my code, it seems VB generated this line:

Me.Wizard1.Pages.AddRange(New ActiproSoftware.Wizard.WizardPage() {Me.WizardPage1, Me.WizardPage2, Me.WizardPage3})

That seemed redundant to me so I deleted the .Pages.Add lines and left the .Pages.AddRange line. Now the wizard works perfectly at runtime and design-time.

Thanks a lot...
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.