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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top