constructor
-
sir actualy i am passing one form reference in constructor to use its control in another form but i am not getting the control of first form in second form ....... please provide some solution
Although it is hard to guess without seeing your code, I think that the most probale reason is, that the control in question is private. So, to access the control from the second form, just set the control to public or provide public accessor in the first form.
-
sir actualy i am passing one form reference in constructor to use its control in another form but i am not getting the control of first form in second form ....... please provide some solution
That doesn't sound like a good way to do it. You likely want the second form to have an event and have the first form register a handler for that event.
-
sir actualy i am passing one form reference in constructor to use its control in another form but i am not getting the control of first form in second form ....... please provide some solution
See my article on events here[^] for a better method than constructor injection, in particular the section "Form Communication Using Events".
Dave
Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)