borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Locating a file)Next Topic (Redirect sound from modem to sound card (Using TAPI...)) New Topic New Poll Post Reply
AndreaVB Forum : API : Scaling a Picture Box
Poster Message
FormsMan
Level: Protégé

Registered: 29-08-2002
Posts: 4

icon Scaling a Picture Box

I'm drawing shapes into a picture box using API functions. I tried defining the scale  (Set ScaleMode to inches and set the scale of the picture box and the origins using the 'Scale' method)  BUT changing the scale seems to have absolutely no effect on the size of the APIs as they're drawn out - it always comes out the same size and does not seem to be according to the set scale... Ideas?  

11-01-2005 at 09:53 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Scaling a Picture Box

Well, API's use pixels for drawing, so, if you are passing values in twips, convert those values to pixels, and then send this values to API's. To convert twips to pixels, you can use form's ScaleX and ScaleY methods, for horisontal/vertical conversion, respectively.

____________________________
If you find the answer helpful, please mark this topic as solved.

12-01-2005 at 01:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : Scaling a Picture Box
Previous Topic (Locating a file)Next Topic (Redirect sound from modem to sound card (Using TAPI...)) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder