create image objects dynamically 
Author Message
 create image objects dynamically
As title. Thanks in advance
Bye
Jack



Fri, 19 Nov 2004 14:35:03 GMT  
 create image objects dynamically
Hi Jacky:

Quote:
> As title. Thanks in advance

You're title's pretty vague -- perhaps if you more specifc....

Do you want to draw images, do you want to load an image control, etc....

Doug.



Fri, 19 Nov 2004 22:15:08 GMT  
 create image objects dynamically
Let's put it this way. My boss wants me to write a program with a forklift
that transfers the goods onto the racks.  The goods are generated from the
dock leveler,
and there is only one forklift, when the forklift retrieves the goods, it
will put it at the nearest location on the racks. The problem is when the
second goods is generated, i need to create another image control...
so what do i do? it is like
goods(1).visible = true
goods(2).visible = false
goods(3).visible = false

after the second retreival, we get two pieces of goods on the rack.
Therefore I have to generate the second piece of goods dynamically such as
set goods(i) = new image
or something like this, of course the above won't work!
Any advice. Thanks
Jack



Quote:
> Hi Jacky:

> > As title. Thanks in advance

> You're title's pretty vague -- perhaps if you more specifc....

> Do you want to draw images, do you want to load an image control, etc....

> Doug.



Sat, 20 Nov 2004 00:13:23 GMT  
 create image objects dynamically
Hi Jacky:

Quote:
> The problem is when the
> second goods is generated, i need to create another image control...
> so what do i do? it is like
> goods(1).visible = true
> goods(2).visible = false
> goods(3).visible = false

> after the second retreival, we get two pieces of goods on the rack.
> Therefore I have to generate the second piece of goods dynamically such as
> set goods(i) = new image
> or something like this, of course the above won't work!

If you already have an Image control placed on the form (or usercontrol)
at design time and have the Index property set to a number, then you
can use "Load", i.e.

   Load Image1(MyNextIndex)

Otherwise, you could use the Controls.Add Method, i.e.

   Set img = Controls.Add("VB.Image","MyUniqueImageName")

You can get more specifics in the vb docs under "Load" and "Controls Collection"

Doug.



Sat, 20 Nov 2004 02:20:02 GMT  
 create image objects dynamically
Thanks... Great Help
Bye
Jack



Quote:
> Hi Jacky:

> > The problem is when the
> > second goods is generated, i need to create another image control...
> > so what do i do? it is like
> > goods(1).visible = true
> > goods(2).visible = false
> > goods(3).visible = false

> > after the second retreival, we get two pieces of goods on the rack.
> > Therefore I have to generate the second piece of goods dynamically such
as
> > set goods(i) = new image
> > or something like this, of course the above won't work!

> If you already have an Image control placed on the form (or usercontrol)
> at design time and have the Index property set to a number, then you
> can use "Load", i.e.

>    Load Image1(MyNextIndex)

> Otherwise, you could use the Controls.Add Method, i.e.

>    Set img = Controls.Add("VB.Image","MyUniqueImageName")

> You can get more specifics in the vb docs under "Load" and "Controls
Collection"

> Doug.



Sun, 21 Nov 2004 22:36:54 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. dynamically create image in PictureBox?

2. dynamically create a control and insert a image

3. Sending dynamically created image to browser??

4. Dynamically create an Image Control

5. Can't dynamically create ActiveX objects in formload

6. Dynamically create form objects from a dll

7. Handling Events of Dynamically Created Classes/Objects

8. Dynamically Creating an object of a certain type

9. Create Object dynamically (for Windows Media Player)

10. Dynamically created ActiveX objects...

11. Need Help Creating Objects dynamically

12. dynamically create objects...

 

 
Powered by phpBB® Forum Software