i have created two forms and two controls, form1 has a button, form two has label. now i wanted the caption of my label to change after clicking on my button, but i just can not call in the control "label" into my button click event because there are from different forms.
can anyone help me in the publi and private module???
thanks allot!

Recommended Answers

All 3 Replies


Write this in Form1's button click event:

Form2.Lable1.Caption = "<My Caption>"


You can use the Control of another page. what you need to do is just inherit that class.

DeliverClass : BaseClass
BaseClass BC = new BasClass()
Create One Var(Z0)
Z0 = bc.ControlName.<Ur Requirements>/
Hope I am Clear and it will help You.

Are you sure that it will work on classic visual basic (vb 6) ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.