There is not an 'automatic form collection' in VB.NET.
If the Progress Bar is on Form1, then when you open Form2, it needs to have
a way of finding the Open version of Form1. Just referring to Form1 does
not get a reference to the Open Form1, just to the Form1 class. (You could
have 20 open Form1's in your app)
So, Form2 would have a variable that refers to the open Form1:
Public frmWithProgressBar as Form1
Then to open Form2, Form1 would do:
Dim f as new Form2
f.frmWithProgressBar = Me
f.show
Then Form2 would reference the ProgressBar on the Form1 that opened it as:
me.frmWithProgressBar.NameOfTheProgressBarOnForm1
You could do a property on Form2, but the Public Variable is easier to begin
with.
Kevin
"Carlos" <cp@swa.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Excuse my ignorance,
how can you do that ?
Thanks
"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:uj**************@TK2MSFTNGP10.phx.gbl... Create a public property on the second form that references the control
value - then you can juse reference it as Form2.WhateverProperty
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Carlos" <cp@swa.com> wrote in message
news:ey**************@TK2MSFTNGP12.phx.gbl... In VB6 I was able to accessa control like a progressbar form a
different form, for example
frm1.progressbar1.value =XXX
but now how can I do that in VB.NET
Thanks