On Apr 12, 2006, at 1:42 AM, Mark O'Neill wrote:
Hi All,
Probably a dumb question, but I've been racking my brain for a
solution and just can't figure it out, so any help to pull me out
of the imbecile league would be appreciated!
Basically, I've got images dragged in my project, they are called:
ButtonOverImg
ButtonOverImg16
ButtonOnImg
ButtonOnImg16
...
etc.
The non-16-named images are loaded into an array and I'm trying to
work on a function that will replace the image at an array index
with it's "16" counterpart. What I'd like is something like:
for i As Integer = 0 to UBound(MyArray)
MyArray(i).Icon = MyArray(i).Icon + "16"
next
...but obviously that doesn't work - I'm using that as a literal
example of what I'd like to happen.
Any help would be appreciated.
Based on the posted requirements, you could simply create two arrays
and then write some conditional code to access from either array
depending on the state that you want.
dim MyNon16Images() as Picture
dim My16Images() as Picture
MyNon16Images.Append ButtonOverImg
MyNon16Images.Append ButtonOnImg
...
My16Images.Append ButtonOverImg16
My16Images.Append ButtonOnImg16
Then if you have a boolean to distinguish the states:
If Condition1 then
Canvas1.Graphics.DrawPicture MyNon16Images(0), 20,20
Else
Canvas1.Graphics.DrawPicture My16Images(0), 20, 20
End if
This would seem to do what you want, but if you need more flexibility
you could wrap your images in a custom class.
Best,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>