|
-
Oct 12th, 2005, 07:30 AM
#1
Thread Starter
G&G Moderator
[RESOLVED] Set ScaleHeight of PictureBox
Howdy all,
Just wondering if theres a simple equation needed to set the scaleheight of a Picturebox when its ScaleMode is set to pixels, using the Height property.
Something like..
VB Code:
PictureBox.Height = 38 * Screen.TwipsPerPixelY
I'm hoping to set the scaleheight to a certain number, but doing that normally does nothing but change the ScaleMode to User, thinking I'm making my own scale.
Any help is greatly appreciated.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Oct 12th, 2005, 07:34 AM
#2
Re: Set ScaleHeight of PictureBox
The Height property depends on the ScaleMode of the Form it resides on and also what kind of border the PictureBox has. The ScaleHeight doesn't include the border. If you use the normal 3D-look the border is 2 pixels in height but you have the border in both the upper and lower sides meaning that the height is ScaleHeight + 4 pixels. You might need to recalculate that into Twips or whatever scalemode you have for the Form.
-
Oct 12th, 2005, 07:38 AM
#3
Thread Starter
G&G Moderator
Re: Set ScaleHeight of PictureBox
Oh god.
I'd totally forgotten that it depended on the parent, in this case the form.
Resolved making the Form's scalemode Pixels aswell.
Thanks Joacim.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|