Click here to Skip to main content
15,898,538 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey.I load a bitmap image into my loaddata class by GDI+.
then i want to access a picturebox in my main form to show the
bitmap image.How can i access picture box in loaddata class?
Posted

1 solution

The best way to do that would be to return the image to the form in the function.

In your loaddata class, create a function that load the image and return it.

In your form class, call the function and put the image in the picture box.

That's the best way to do it because you separate the form from your data class and you separate the loading of the image from your form.

If you need more detail, don't hesitate to ask for a more detailed answer in the comments.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900