On Tue, 1 Jul 2003 12:19:15 -0400, "Yang Li Ke"
<ya******@sympatico.ca> wrote:
Borders = Width - ScaleWidth
what do you mean by Borders ?
a picture box has no Borders
Try it - with a PictureBox with BorderStyle set to FixedSingle
Private Sub Command1_Click()
Me.Print Picture1.Width - Picture1.ScaleWidth
End Sub
You should get 60 printed - eg: 4 pixels
Actually I was being obscure
- the ScaleWidth property is rather different from the Width property
- changing the ScaleWidth property directly changes the 'ScaleMode'
- it is like changing the ScaleMode from vbTwips to vbPixels
(like, but not exactly that - look up ScaleWidth in the Help File)
To adjust something to have a desired ScaleWidth you _must_ attack it
through the Width property
- hence
Borders = Width - ScaleWidth
or
Width = Borders + ScaleWidth
Obviously the ScaleMode must be the same ...