tmighty
tmighty

Reputation: 11399

Upgrading VB6 to VB.NET - Usercontrol not available because I could not compile the project

I have upgrade a VB6 project with the upgrade wizard to VB.NET.

I think I am in a vicious circle now:

There is one user control in my main form that is accessed from many other forms.

The IDE tells me that it shows the maximum amount of errors (102), and those shown are all like:

ucPage is not a member of prjMyProject.frmMain
ucPage is not a member of prjMyProject.frmMain
ucPage is not a member of prjMyProject.frmMain
EB1 is not a member of prjMyProject.frmMain
EB1 is not a member of prjMyProject.frmMain

I need to replace EB1 with a standard control, but I can not load the frmMain in the designer because the IDE is still mocking about the missing ucPage control on the form.

And the user control "ucPage" is not available in the toolbox because I have not been able to compile the project yet, so I can not even put it on my form. This is a vicious circle, I think.

Does anybody have any suggestions on how to resolve it?

Upvotes: 0

Views: 706

Answers (1)

Victor Zakharov
Victor Zakharov

Reputation: 26424

If you are converting VB6 projects to VB.NET (especially with UI), be prepared to encounter a lot of errors, because many VB6 tricks are not compatible with VB.NET. There is a way to manually edit form designer code in VB.NET:

  1. Solution Explorer - Show All Files. Notice your form file in Solution Explorer can now be expanded.
  2. Expand the form in question, and double-click Designer.vb file.
  3. If designer file is not there, chances are designer code is sitting in the vb file under #Region "Form Designer generated code", usually on the very top.

Upvotes: 1

Related Questions