|
-
Oct 30th, 2000, 12:14 PM
#1
Thread Starter
New Member
Hello all,
I am trying to write a simple app which has parallel arrays. One array has option buttions and the other array
has images. I want to move an image to a larger image based on the option selected.
My click event for the options buttons is;
Private Sub Option_Click(Index As Integer)
imgPicture.Picture = Image(Index).Picture
End Sub
Why do I get an error of 'invalid qualifier'?
Gary
Gary
trying to convert from mf to object O tech
-
Oct 30th, 2000, 12:32 PM
#2
Frenzied Member
How do you declare your array of picture?
You have to set each element in your array as picture.
ex:set array(2).picture = "c:\allo.bmp"
-
Oct 30th, 2000, 12:42 PM
#3
transcendental analytic
Use stdpictures instead of pictureboxes if their only purpose is to store the picture contents that will show up when you click the option. You get invalid qualifier because you didn't use Set as sebs showed you. Set should be used to set any object variables.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 30th, 2000, 12:49 PM
#4
Thread Starter
New Member
more confused
Thanks for the reply but I am more confused.
Each image property in the image array has a picture
defined. All I want to do is move one of these pictures
to the big image box on the form.
My text book says to make the arrays parallel. What does
that mean. Do I have to do something special to make
the arrays parallel.
Gary
trying to convert from mf to object O tech
-
Oct 30th, 2000, 12:58 PM
#5
transcendental analytic
Nothing special with parallell arrays, you just know that both arrays contain related data for each element independently, that means when you add something to the first, you also add to the other, that goes from removing, moving and swapping the data.
I think you should use Stdpictures to save resources: declare the array as Stdpicture instead of picturebox and use the stdpicture directly when loading the bitmap:
Code:
Image(index) = Loadpicture("C:\Yourpic.bmp")
Then to set the Image contents to the imagebox:
Code:
set imgPicture.Picture = Image(Index)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 30th, 2000, 01:01 PM
#6
Frenzied Member
I don't know what you're doiing wrong, cuz i just try it
and it works great.
-I put an array of image
-1 picture box
-array of option button
and here's my code:
Code:
Private Sub Option1_Click(Index As Integer)
Picture1.Picture = Image1(Index).Picture
End Sub
it works!!!!
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
|