0

Hi

I have two forms MainForm and DisplayForm. From MainForm i get the file name on button click and load the form in picturebox placed on display form... Can any one tell me how to do that???

Thanks in advance

3
Contributors
8
Replies
9
Views
5 Years
Discussion Span
Last Post by abelLazm
1

pass file name as string to the constructor or display form and in diplayform_load event load it in picture box just like suggested in this thread

0

Do you get file name from the textbox of the Main form. If so you no need to pass the filename. get the filename from the mainform's textbox!!

0

That is not possible samueal because controls of a form are declared private and cannot be manipulated from outside the form

0

Thanks Abellazm... samueal i have tried your solution but it is giving a number of exceptions can you please explain it???? If it is good then is much easier than that of what abellazm has suggested.

0

That is not possible samueal because controls of a form are declared private and cannot be manipulated from outside the form

Yes but it is easier to change it to public!!

0

Thanks Abellazm... samueal i have tried your solution but it is giving a number of exceptions can you please explain it???? If it is good then is much easier than that of what abellazm has suggested.

Can u please specify the exceptions??

Edited by samueal: n/a

0

Thanks Abellazm... samueal i have tried your solution but it is giving a number of exceptions can you please explain it???? If it is good then is much easier than that of what abellazm has suggested.

Change the textbox in the Mainform to Public and access the values from other form

0

Yes it is pretty obvious that changing private controls to public but it is against conventions anyway one can do that if it is feasible for him.:)

Edited by abelLazm: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.