Well, as I understand it, you can't do that because to reference the
form from the module you'd have to instantiate a new reference - which
wouldn't help you much because your visible form would be a different
instance to the one you were setting the value of.
It would probably be better to make the xml module into a class, and let
the form consume it via properties and such.
Paul
Duane Roelands wrote:
> Hello all.
>
> I'm having some difficulty accessing the .text property of a label on my
> startup form.
>
> My form is frmStartup, and this is the application's startup object (as
> opposed to sub Main() ).
>
> I have a module called "xmlHandler", and in that module, I would like to
> change the .text property of the lblStatusMessage label which is on
> frmStartup.
>
> Now, if my startup object were sub Main(), this would be simple...
>
> dim myForm as new frmStartup
> myForm.lblStatusMessage.text = "foo"
>
> However, because my startup object is frmStartup, I'm not sure what the
> reference to the instance of the frmStartup class is. Any guidance would be
> appreciated. Thank you in advance.
>
> Duane Roelands
>
>
|