Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Forms inhertiance

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
shern
Asked:
shern
1 Solution
 
imessvbCommented:
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
 
shernAuthor Commented:
yeah or so i figured
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now