Solved

Remove DefInstance

Posted on 2004-03-29
3
315 Views
Last Modified: 2008-03-17
Hi,

Have converted over an application from Access to vb6 to Vb.net

In the upgrade from vb6 to Vb.net, the conversion tool created a property called "DefInstance".

This is used to reference a control in a form from outwith that form. (e.g. A Code Module)

Am getting issues with this DefInstance in Form initialization.

Does anybody know a way around using "DefInstance"

Thanks.
0
Comment
Question by:KBanner
3 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 10703984
In VB6, forms were easily accessed as shared members (i.e. Form1.TextBox1).  In VB.NET, you need an instance of a variable in order to reference something on a form:

Dim frm As New Form1
frm.TextBox1

The DefInstance is the migration wizard's answer to overcoming this switch in paradigm.  You could remove it, but you would need something similar in its place.

Bob
0
 

Author Comment

by:KBanner
ID: 11072712
My sincere apologies,

Another escaped the net. Bob yet again helping people and nobody thanking him. Hope this helps
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question