You need to either:
1. as Tadit Dash suggests, modify the static method so it returns a bitmap/image to the caller ... or ...
2. pass a reference to the PictureBox to which the bitmap/image is to be assigned to the static method as a
parameter.
Keep in mind that a static method "belongs" to the Class it is defined in: it is visible/usable from/in all
instances of the Class.
Consider this Class:
public class Class1
{
public string ID { get; private set; }
public Class1(string id)
{
ID = id;
}
public static void showID()
{
}
}
What this demonstrates is that a static method has no "knowledge" of which instance of the Class it was called from: you must
explicitly pass a reference to the current Class to the static method. Or, you need another variable/field defined as static that holds a reference to the current Class which the static method can access.