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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Excuse my ignorance,
> how can you do that ?
>
> Thanks
> "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >
> > >
> >
> >
>
>