retrieve images and index

lux1963

New Member
Licensed User
hi,

I have 2 great problems,

1) i used AddEvent for create multiple call at same sub which is the method for retrieve the number of control that have generated the event?

i.e.

sub myevent
for x=1 to 33
if sender=control("image"&x) 'don't work!!!!
generator=x
endif
next
end sub


2) if I put many images in several Image controls using Imagelist control

for example:

Control("Image" & A).image = Imagelist1.item(4)

if I want retrieve the image contents in this Image control i try to use:

if Image1.image = Imagelist1.item(4) then
....
....
endif

but don't work!!!


thanks for help and excuse me for the incorrect english
 

agraham

Expert
Licensed User
Longtime User
1) If sender = "image" & x Then ' sender returns a string

2) Not sure what you want to do here but you cannot compare images. You will need to keep a separate record of index of the image assigned to an Image control if you want to check the image being used.
 

lux1963

New Member
Licensed User
great!!!

I named my control "Image" but sender return "image".

I used compare 2 picture with visual basic... ok i'll use separate record index



thank you very much.. agraham
 

agraham

Expert
Licensed User
Longtime User
I named my control "Image" but sender return "image".
Yes. B4PPc lower-cases all control names used internally.
I used compare 2 picture with visual basic...
Probably it was comparing the image names or filenames. TIn b4PPC the Image property is the actual bitmap of the Image.[/quote]
thank you very much.. agraham
You're welcome :)
 
Top