I have 2 source files, A.cs and B.cs. Source file A.cs has a picturebox

and B.cs contains a series of commands to run b4 displaying an image to A.cs's picturebox

Is there a statement i nid to put in my B.cs class so as to access the picturebox of A.cs as i am unable to do so from B.cs right now.

I'm still pretty new to C#, so pls pardon my incompetence in explaining.

Thanks for the help.

Assuming A and B are classes and in the same process then why not do it the other way around.
Instead of B setting the picture in A, have A get the picture from B and set the picture box itself.

Pseudo code might be:

Main program create A.
A creates B.
B does its thing to get image.
A gets image from B via property.
A sets its PictureBox image.

Be a part of the DaniWeb community

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