Forum Discussion

th6186's avatar
Occasional Visitor
7 years ago

How to compare image in a WinForms PictureBox to resource?



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:


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


Does anyone have a good idea?




No RepliesBe the first to reply