PIXELS, PIXELS, PIXELS 
Author Message
 PIXELS, PIXELS, PIXELS

Hello,

        I just switched to programming in VB5 from other multimedia authoring
systems.

        I am used to setting an app size in PIXELS to match a clients
specification. I can't seem to figure it out in VB.

        I'm not a total nmewbie at VB, just as far as using graphics go (I
used to do alot of VBA ACCESS apps).

        I need an app 800 x 450. Twips don't cut it. I know how to change the
scale mode and it doesn't seem to work (for the forms over all size).

        Guess I'm getting confused with Scale properties being for the
outside dimensions of the form.

        I want eveything to default to pixels so I can align assets per as
graphic designers co-ordintes (always in pixels).

        I'd like to set .Height = 450 and .Width = 800 for form properties and
then also be able to give co-oridinates in graphics (ie, imageboxes) in pixels
too.

        Sorry if this is newbie type question, I searched Online help, and
some  VB websites and found nothing I could use direclty or figure out.

        Any Replies Appreciated.

        TIA,

                Hannah



Tue, 30 May 2000 03:00:00 GMT  
 PIXELS, PIXELS, PIXELS

I think I know what's got you confused.  Setting the ScaleHeight (or width)
of a form in code only changes the ScaleMode to Userdefined: it doesn't
actually change the size of the form at all!

If you need the entire form to be 800x450 pixels, set the form's Width =
800 * Screen.TwipsPerPixelX and similarly for the height.  The scalemode
has no effect on the height and width properties: they're always in twips.

If you need the _client area_ of the form to be 800x450 pixels, you can
either call API functions to find border, caption bar, and menu bar sizes
before you set the height and width, or you can compare the scaleheight and
scalewidth with the height and width (with any unit conversions you need
depending on the scalemode) and adjust accordingly, since the scaleheight
and scalewidth properties you read give the client area alone (in the
current units of scalemode).

HTH

Jim Deutch
MS Dev MVP



Quote:
> Hello,

>         I just switched to programming in VB5 from other multimedia
authoring
> systems.

>         I am used to setting an app size in PIXELS to match a clients
> specification. I can't seem to figure it out in VB.

>         I'm not a total nmewbie at VB, just as far as using graphics go
(I
> used to do alot of VBA ACCESS apps).

>         I need an app 800 x 450. Twips don't cut it. I know how to change
the
> scale mode and it doesn't seem to work (for the forms over all size).

>         Guess I'm getting confused with Scale properties being for the
> outside dimensions of the form.

>         I want eveything to default to pixels so I can align assets per
as
> graphic designers co-ordintes (always in pixels).

>         I'd like to set .Height = 450 and .Width = 800 for form
properties and
> then also be able to give co-oridinates in graphics (ie, imageboxes) in
pixels
> too.

>         Sorry if this is newbie type question, I searched Online help,
and
> some  VB websites and found nothing I could use direclty or figure out.

>         Any Replies Appreciated.

>         TIA,

>                 Hannah



Tue, 30 May 2000 03:00:00 GMT  
 PIXELS, PIXELS, PIXELS


Fri, 19 Jun 1992 00:00:00 GMT  
 PIXELS, PIXELS, PIXELS

Thanks for the post, and even more so for the explanation.
Got it going now:>

Hannah


~I think I know what's got you confused.  Setting the ScaleHeight (or width)
~of a form in code only changes the ScaleMode to Userdefined: it doesn't
~actually change the size of the form at all!
~



Fri, 02 Jun 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Pixel by Pixel Scrolling in QBasic

2. Rotate one pixel around another pixel...

3. BMP output mapping BMP-pixel to printer-pixel 1:1

4. Print PicBox pixel by pixel?

5. How to change True color pixel to 256 color pixel, @Thanks

6. full screen graphics, pixel by pixel control

7. How do I paint pictures, pixel by pixel, faster than this ?

8. anybody got bitmap format file..., i try to read pixel by pixel...

9. Bitmaps pixel by pixel is S..O.. S..L..O..W.... !Help needed

10. What's the easiest way to get pixel by pixel color info from a BMP?

11. How to read Pixel after Pixel in a Bitmap (.bmp) ..?

12. Any Way To Get JPEG Size In Pixels?

 

 
Powered by phpBB® Forum Software