|
-
Aug 14th, 2003, 11:37 PM
#1
Thread Starter
Lively Member
Simple question on Image
Hi to all!
How can i check what picture is loaded in an image control?
I've tried this code, but doesn't work:
If image1.picture = "C:\computer.ico"
msgbox " image1 has an icon of a computer"
else
msgbox " no computer icon has been found"
endif
-
Aug 15th, 2003, 12:41 AM
#2
Hyperactive Member
set the .tag property to the image location, then compare that.
Now returning to the world of VB. Please make sure your seatbelts are securely fastened and all trays are in their upright and locked position.
-
Aug 15th, 2003, 12:47 AM
#3
Junior Member
You could set each path/picture you load to a variable first, such as MyPicture, then use Dir(MyPicture) when you want to know which one is loaded.
-
Aug 15th, 2003, 04:25 PM
#4
Something like this maybe?
VB Code:
Dim CompPic As Picture
CompPic = LoadPicture(FileName)
If Picture1.Picture = CompPic Then '...
Has someone helped you? Then you can Rate their helpful post. 
-
Aug 15th, 2003, 04:35 PM
#5
Hyperactive Member
just keep track of the filename when you set it..... like in the tag property, or in some static/global variable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|