Solved

Remove DefInstance

Posted on 2004-03-29
3
311 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
Comment Utility
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
Comment Utility
My sincere apologies,

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now