Width and Height of a picture object 
Author Message
 Width and Height of a picture object

I'm creating a control that has to show a picture centered on it. Only one
problem, the Width and Height properties of the Picture object are not in
pixels, not in twips. I don't remember the name of the unit. How can I
convert the unit from the picture to pixels?


Sun, 19 Jan 2003 03:00:00 GMT  
 Width and Height of a picture object
Hi Etienne:

Quote:
> the Width and Height properties of the Picture object are not in
> pixels, not in twips. I don't remember the name of the unit.

HiMetric

Quote:
> How can I  convert the unit from the picture to pixels?

Use the ScaleX and ScaleY methods.

Doug.



Sun, 19 Jan 2003 03:00:00 GMT  
 Width and Height of a picture object

Etienne,

Quote:
>I don't remember the name of the unit.

The unit is himetric.

Quote:
>How can I convert the unit from the picture to pixels?

Use the ScaleX and ScaleY methods.

Matt

============================================

  VB+ - http://hem.spray.se/mattias.sjogren/
  CodeHound - Free VB Search Engine
  http://www.codehound.com



Sun, 19 Jan 2003 03:00:00 GMT  
 Width and Height of a picture object
How do I use the ScaleX and ScaleY methods?



Quote:
> Hi Etienne:

> > the Width and Height properties of the Picture object are not in
> > pixels, not in twips. I don't remember the name of the unit.

> HiMetric

> > How can I  convert the unit from the picture to pixels?

> Use the ScaleX and ScaleY methods.

> Doug.



Sun, 19 Jan 2003 03:00:00 GMT  
 Width and Height of a picture object
Etienne,

Quote:
>How do I use the ScaleX and ScaleY methods?

pixel_width = ScaleX(YourPicture.Width, vbHimetric, vbPixels)
pixel_height = ScaleY(YourPicture.Height, vbHimetric, vbPixels)

Matt

============================================

  VB+ - http://hem.spray.se/mattias.sjogren/
  CodeHound - Free VB Search Engine
  http://www.codehound.com



Mon, 20 Jan 2003 03:00:00 GMT  
 Width and Height of a picture object
Hi Etienne:

Quote:
> How do I use the ScaleX and ScaleY methods?

Matt posted an example... you could have, however, looked it up in the VB
docs ;-)

Doug.



Mon, 20 Jan 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. picture object height and width are incorrect.

2. Setting form width/height = image width/height

3. picture height is different from Picture.picture.height

4. picture height is different from Picture.picture.height

5. picture height is different from Picture.picture.height

6. picture height is different from Picture.picture.height

7. picture height is different from Picture.picture.height

8. Set the Width and Height of Picture control

9. Problems with height, scaleheight, width and scalewidth of various objects

10. Image Object / Width and Height

11. StdPicture Object - .Width and .Height in HiMetric?

12. Getting the Height and Width using VB?

 

 
Powered by phpBB® Forum Software