Avatar of StuartK
StuartKFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Upgrade Wizard issues - DefInstance!!

Hi,

Thanks for clicking.

I've converted over my appication from vb6 to vb.net.

As part of the upgrade wizard it uses DefInstance property to reference controls within a form from outside that form.

I've hit problems with DefInstance when initializing a new instance of a form. In short it ends up in a repeating loop due to the initialisation of the form calling DefInstance for a control before form has been initialized properly

Is there a way around using DefInstance?? How are controls referenced from outside that form if creating vb.net project from new.
.NET Programming

Avatar of undefined
Last Comment
StuartK
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of StuartK
StuartK
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Hi Bob,

Noticed this is still open.

Just for your knowledge. Have removed DefInstance by Form1.DefInstance with m_Form1.

Public m_Form1 As Form1

and then

m_Form1 = New Form1

Thanks as always for your help
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo