Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Scale mode in VB6

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I created a form and added a picture box to it.<br>I set the picture &quot;Scale mode&quot; to Inch <br>So when I click on the picture it returns 3.456&quot; x 5.567&quot;<br>I need the coordiantes to be in inches not pixels or pels or wahtever.<br>When I size the picture I want the form to size with it.<br>I also set the forms Scalemode to inch.<br>But Width of the form shows up Pels not in inches.<br>Why is that? <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
I could be wrong, but I think you might be confused about how the scale properties work in VB.&nbsp;&nbsp;ScaleMode affect things like scaleheight and scalewidth and drawing commands like line and pset.&nbsp;&nbsp;When you set the scalemode to inches, you should treat scaleheight and scalewidth as read-only.&nbsp;&nbsp;When you set scaleheight or scalewidth, it will not change the actual height and width of the picture or form, but it will change scalemode to &quot;user&quot; and it will change how graphics commands like line and pset draw on the form or picuture.&nbsp;&nbsp;If you would like to change the size of the picture or form, you should use the height and width and these are in twips regardless of scalemode(BTW there are 1440 twips per inch).
 
Doug,<br><br>Is there a Resize event on the picture control? If there is you could use that to resize the form when you change the size of the picture.<br><br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?" My home email is michael.j.lacey@ntlworld.com&lt
 
So I guess I need to convert Inches to twips for this to work?<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
the inches thing would seem useless unless you plan to print these things out or something, because different monitors, screen res,etc going to present inches differently, if the video card or screen res doesnt understand or know the monitor's Dots Per Inch thing. pixels would be much more accurate accross platforms. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
The Application is for a Blueprint<br>See my Web Site<br><A HREF=" TARGET="_new"> HREF=" TARGET="_new"> am working on a second generation of the product.<br>Inches just seemed the logical choice.<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
but its onscreen the whole time right? <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top