Image array Picture Property 
Author Message
 Image array Picture Property

Hi, thanks in advance for reading this.

The intention of my program (beside other things) is that the user
first selects a directory.
Hereafter my program will load all *.bmp pictures available in that
directory, on a form which includes an array of imageboxes.
(Generally I'am using a loop doing following:
- using  Dir  to get the picturename
- load that picture in a imagebox by using
form1.image1(i).Picture=LoadPicture(Picturename))

This works fine.
Next I want  the picturename being visible in a label on a form each
time the user  moves its mouse over a particulair picture.

When using for example form1.label1.Caption =
form1.Image1(Index).Picture in the Image1_MouseMove event
(do not look for the exact syntax) , the result present in the label
will NOT be a name(string) but a number?
So the mousemove event works okay, but the picturename will only be
available as a number.

1. Should I create an array with picturenames while loading all
pictures?
2. Any relation between the received number and its corresponding
name?
3. Any other suggestion how to solve this?

P.S I'am using VB4(16bit) and WIN95

Any help would be appreciated.



Sun, 18 Mar 2001 03:00:00 GMT  
 Image array Picture Property
The Picture property is a bitmap handle, which is a number. Once loaded, VB
does not remember the path of the bitmap from which the picture was loaded
- you will have to store the names yourself, in a string array or whatever.
-Andy.



Quote:
> Hi, thanks in advance for reading this.

> The intention of my program (beside other things) is that the user
> first selects a directory.
> Hereafter my program will load all *.bmp pictures available in that
> directory, on a form which includes an array of imageboxes.
> (Generally I'am using a loop doing following:
> - using  Dir  to get the picturename
> - load that picture in a imagebox by using
> form1.image1(i).Picture=LoadPicture(Picturename))

> This works fine.
> Next I want  the picturename being visible in a label on a form each
> time the user  moves its mouse over a particulair picture.

> When using for example form1.label1.Caption =
> form1.Image1(Index).Picture in the Image1_MouseMove event
> (do not look for the exact syntax) , the result present in the label
> will NOT be a name(string) but a number?
> So the mousemove event works okay, but the picturename will only be
> available as a number.

> 1. Should I create an array with picturenames while loading all
> pictures?
> 2. Any relation between the received number and its corresponding
> name?
> 3. Any other suggestion how to solve this?

> P.S I'am using VB4(16bit) and WIN95

> Any help would be appreciated.




Sun, 18 Mar 2001 03:00:00 GMT  
 Image array Picture Property

Quote:

> Hi, thanks in advance for reading this.

> The intention of my program (beside other things) is that the user
> first selects a directory.
> Hereafter my program will load all *.bmp pictures available in that
> directory, on a form which includes an array of imageboxes.
> (Generally I'am using a loop doing following:
> - using  Dir  to get the picturename
> - load that picture in a imagebox by using
> form1.image1(i).Picture=LoadPicture(Picturename))

> This works fine.
> Next I want  the picturename being visible in a label on a form each
> time the user  moves its mouse over a particulair picture.

> When using for example form1.label1.Caption =
> form1.Image1(Index).Picture in the Image1_MouseMove event
> (do not look for the exact syntax) , the result present in the label
> will NOT be a name(string) but a number?
> So the mousemove event works okay, but the picturename will only be
> available as a number.

> 1. Should I create an array with picturenames while loading all
> pictures?
> 2. Any relation between the received number and its corresponding
> name?
> 3. Any other suggestion how to solve this?

> P.S I'am using VB4(16bit) and WIN95

> Any help would be appreciated.


with form1
    .Image1(Index).ToolTipText=PictureName
    .Image1(Index).Picture=LoadPicture(.Image1(Index).ToolTipText))
end with


Mon, 19 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Replacing a pictures properties with another pictures properties

2. How to put image array on picture box

3. How to load array of images from a file into a Picture Box in VB.N

4. How to put image array on picture box

5. Setting the picture property of an image

6. Saving and retrieving image control picture property in MSSQL7

7. Picture Property Of Image

8. ActiveX - Image Control - Picture Property

9. aving and retrieving image control picture property in MSSQL7

10. Saving a Picture Box's IMAGE property

11. Image property stops picture resizing correctly ?

12. How to copy hDC property of picture control to an image control

 

 
Powered by phpBB® Forum Software