Solved

Remove DefInstance

Posted on 2004-03-29
3
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

734 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