Simple question, (sorry if this has already been covered - couldn't find it.) - why does a newly loaded image not show, but is OK if passed to another button?
I have a row of 5 ImageButtons, with no images at the start. They will all shown the same picture: button-1 is loaded from an SQL BLOB and the others are set from the 1st one.
Button-1 does not show the picture, only a red cross. The other 4 buttons show the image correctly.
The code is:-
cmd.CommandText = "SELECT * FROM FileStore WHERE Name = 'camera_pic'"
reader.Value = cmd.ExecuteReader
reader.ReadNextRow
btnPic1.Image = reader.GetImage(2)
reader.Close
btnPic2.Image = btnPic1.Image
btnPic3.Image = btnPic1.Image
btnPic4.Image = btnPic1.Image
btnPic5.Image = btnPic1.Image
Easy workaround is to add "btnPic1.Image = btnPic2.Image" at the end, but why does it not show the first time?
If I replace the first button by an Image control, it shows perfectly. It's no big deal, but curious! Am I doing something wrong?
Geoff.
I have a row of 5 ImageButtons, with no images at the start. They will all shown the same picture: button-1 is loaded from an SQL BLOB and the others are set from the 1st one.
Button-1 does not show the picture, only a red cross. The other 4 buttons show the image correctly.
The code is:-
cmd.CommandText = "SELECT * FROM FileStore WHERE Name = 'camera_pic'"
reader.Value = cmd.ExecuteReader
reader.ReadNextRow
btnPic1.Image = reader.GetImage(2)
reader.Close
btnPic2.Image = btnPic1.Image
btnPic3.Image = btnPic1.Image
btnPic4.Image = btnPic1.Image
btnPic5.Image = btnPic1.Image
Easy workaround is to add "btnPic1.Image = btnPic2.Image" at the end, but why does it not show the first time?
If I replace the first button by an Image control, it shows perfectly. It's no big deal, but curious! Am I doing something wrong?
Geoff.