Picture property

K

kirkm

Hi,

The Picture property has been set at design time, but later changed to
another image with the line:-

frmSerial.imgNegLabelA.Picture = frmLabelIcons.Controls(k).Picture

frmSerial.imgNegLabelA. is where I want the image and frmLabelIcons
has a bank of thumbnails.

If the form is closed then reopened the original embedded picture
appears, if the above line is skipped.

What I'd like to do is, without closing the Form, show that original
pictue if (k) is Not Found.

Is this possible? I seem to be heading to the 'item' command but
haven't had any success yet.

Thanks - Kirk
 
N

NOPIK

Hi,

The Picture property has been set at design time, but later changed to
another image with the line:-

frmSerial.imgNegLabelA.Picture = frmLabelIcons.Controls(k).Picture

frmSerial.imgNegLabelA. is where I want the image and frmLabelIcons
has a bank of thumbnails.

If the form is closed then reopened  the original embedded picture
appears, if the above line is skipped.

What I'd like to do is, without closing the Form, show that original
pictue if (k) is Not Found.

Is this possible?  I seem to be heading to the 'item' command but
haven't had any success yet.

Thanks - Kirk

if frmLabelIcons.Controls.Items.Count < k

is that what you mean?
 
K

kirkm

if frmLabelIcons.Controls.Items.Count < k

is that what you mean?

I don't think so... k isn't a number... but if it were I'd still
need to set the picture to the default (the one assigned at design
time).

How's that done? Anyone know?

Thanks - Kirk
 
Top