?
Solved

Forms inhertiance

Posted on 2003-02-28
2
Medium Priority
?
138 Views
Last Modified: 2010-05-01
hi all,

in vb6 you could access a forms objects properties from another form by simply calling

form1.label=form2.label

how do you do this in vb.net?
i know u have to create an instance of the form

dim thisform as new form1()

before you can access the objects in the form
but lets say you don't want to create a new instance of the form because its already been created and you just want to access its values from the existing form via another form. how?
0
Comment
Question by:shern
[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
2 Comments
 

Accepted Solution

by:
imessvb earned 80 total points
ID: 8062705
obvious you need to have access to the form variable that you've already created, so let's say you want to access form1 from form2, then it would be better to create the first instance of form1 from form2 and call objform1.publicfield

and if you want to access the controls on form1 you will need to have public accessors

hope this helps
0
 

Author Comment

by:shern
ID: 8086502
yeah or so i figured
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 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