Posted 1 August 2019, 11:50 am EST
How do you copy the image stored in an image cell and use it as the image of a picture box?
Forums Home / ComponentOne / WinForms Edition
Posted by: steven.wood on 1 August 2019, 11:50 am EST
Posted 1 August 2019, 11:50 am EST
How do you copy the image stored in an image cell and use it as the image of a picture box?
Posted 2 August 2019, 8:44 am EST
Hello,
Please use the following lines of code to set the image to PictureBox
```
pictureBox1.Image = (Image)fpSpread1.Sheets[0].Cells[0, 0].Value;
Hope it helps.
Thanks.
Posted 2 August 2019, 10:45 am EST
Is the code you suggested C#, if so what is the VB equivalent as it does not accept that coding.
Thanks
Posted 2 August 2019, 10:51 am EST
Hello,
Please use the following VB equivalent code:
pictureBox1.Image = CType(fpSpread1.Sheets(0).Cells(0, 0).Value, Image)
Thanks,
Posted 4 August 2019, 7:23 am EST
That worked fine.
Thanks