Solved

Remove DefInstance

Posted on 2004-03-29
3
319 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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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