Ask a Question

How to compare image in a WinForms PictureBox to resource?

th6186
Occasional Visitor

How to compare image in a WinForms PictureBox to resource?

Hello,

 

an older application in our company often uses PictureBoxes to display small status images (like cross or check).

To check these in our test cases, we would have to somehow compare the image from the DLLs resources with the image displayed in the PictureBox.

 

We tried to use the following code to get the image which gives us a invalid cast:

pictureBox.GetProperty<System.Drawing.Image>("Image");

Unfortunately the image class does not have a Source-Property or anything worth comparing to the resources.

 

Does anyone have a good idea?

 

Best,

Toby

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: