0

Hi there,

Is there a way in vb2005 to:

passtrough the name of a control to an other sub? I have 5 pictureboxes.
I want to do some action in the other sub, depending on what control has been clicked on.

example:

Private sub Picture1_Click()

dim objControlName as Picturebox

objControlname = Picturebox1

ActionOnClick(objControlName)

end sub


Private sub ActionOnClick(objControlName)

if objControlName.image=("C:\.........\image1.bmp) then
action
endif


I can't figure out how to handle this one...

Please Help..

Thanks ...

Grtz,
Nokkieja
end sub

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Nokkieja
0

Hi,

Am sorry to inform you that you can't get the image name or path after being embedded in the picture box. In order to over come this place the file name in the tag of each picturebox. And then you will be able to compare the picturebox tag to the file source.

0

Thanx for your answer,

but i need to do more things with the control name.
So i actualy need to know how i can use the properties of a control when clicked and in an other sub than the click event.

grtz

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.