Problem setting a picture boxs file in runtime 
Author Message
 Problem setting a picture boxs file in runtime

Hi

The following code does nothing(as in no image is displayed), and I am not
sure why. The lstImages list box contains a list of valid file pathnames, so
that part is ok. Is there a limit to the size of file that can be loaded ?
Some of the picture are from a 6megapixel digital camera.

Thanks

strFileName = lstImages.SelectedItem
pctImage.Image.FromFile(strFileName)



Fri, 04 Nov 2005 20:37:41 GMT  
 Problem setting a picture boxs file in runtime
Hi,

        Try pctImage.Image = Image.FromFile(strFileName)
Ken
----------

Quote:
> Hi

> The following code does nothing(as in no image is displayed), and I am not
> sure why. The lstImages list box contains a list of valid file pathnames,
so
> that part is ok. Is there a limit to the size of file that can be loaded ?
> Some of the picture are from a 6megapixel digital camera.

> Thanks

> strFileName = lstImages.SelectedItem
> pctImage.Image.FromFile(strFileName)



Fri, 04 Nov 2005 20:52:05 GMT  
 Problem setting a picture boxs file in runtime

Quote:
> Hi

> The following code does nothing(as in no image is displayed), and I
> am not sure why. The lstImages list box contains a list of valid file
> pathnames, so that part is ok. Is there a limit to the size of file
> that can be loaded ? Some of the picture are from a 6megapixel
> digital camera.

> Thanks

> strFileName = lstImages.SelectedItem
> pctImage.Image.FromFile(strFileName)

FromFile is a shared function:

pctImage.Image = Image.FromFile(strFileName)

--
Armin



Fri, 04 Nov 2005 20:57:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Picture Boxs

2. question about file list boxs and timers..

3. Setting ACL's on files in code at runtime

4. Runtime error 91/Object variable or With block variable not set problems

5. Setting Crystal Reports Properties during Runtime Problem in VB

6. Setting Data Definition file at runtime

7. Problems setting database location at runtime.

8. How do you set file location at runtime?

9. set text file location (source) runtime

10. Resource file.......setting pictures..........

11. Problem with StatusBar control setting Picture property

12. Problem setting StatusBar1.Panels().Picture property with VB5

 

 
Powered by phpBB® Forum Software