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!

Screen resoultion

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
I have like a setup screen that is maximised.&nbsp;&nbsp;I have set it up with a high resolution (on my pc) but if u go down to a lower resolution you loose half the graphics and screen.&nbsp;&nbsp;<br><br>How would one go about doing this so the whole screen is visible no matter what resolution??<br><br>Thanks for ya help!
 
if this is a picturebox graphic, you can have the graphic &quot;Stretched&quot; to the picture box, and have it stay the same size of the form(or you could just throw the picture onto the form and set stretch property there as well) <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
Its just the layout of the whole screen, with a graphic in the bottom right hand corner.&nbsp;&nbsp;<br><br>When the resolution is made smaller the graphic in the bottom right corner goes off the screen.&nbsp;&nbsp;So all i'm really wanting is for all the objects and controls on the form postion on the from that shows... if u catch my drift?<br><br><br>Thanks
 
you could dynamically set them up, like on Form_Resize, you can have the controls so and so distance from the edge, and so forth. <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
Yeah i've sorta tryed that... The distance from the side of the object to th screen is measured in twips i think, is the height and width of the form measured in twips also??<br><br>Because if i like do <br><br>label1.move frmmain.width / 2, frmMain.height / 2<br><br>Its no where near the center of the form....... and also i'm not sure where abouts of the control it measures from.....&nbsp;&nbsp;&nbsp;av i lot u yet :)<br><br>Thank&nbsp;&nbsp;uuuuuuuu
 
um, to convert Twips to Pixels<br><br>use Screen.TwipsPerPixelX, and Screen.TwipsPerPixelY<br><br>then you can set the scalemode of most of your controls to pixel. also you can use Formmain.ScaleHeight, and FormMain.ScaleWidth (the height and width within the form, excluding the border, caption , etc) <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
ummm looks like it should do what i want, u think u could just write a bit of code (explains it)<br><br>how would i use the Screen.TwipsPerPixelX???<br><br>Thanks!!!!!!!!
 
Try setting the top and left settings of the picture box to (Screen.Height - Form1.Image1.Height - AnyExtraTwips)&nbsp;&nbsp;and (Screen.Width&nbsp;&nbsp;- Form1.Image1.Width - AnyExtraTwips2).&nbsp;&nbsp;That will put the image in the bottom righthand corner of the screen and give it however much extra space between the edge of the screen and the image.&nbsp;&nbsp;If you are thinking of having the program change sizes when the user changes the resolution, just make a timer routine that checks to see if the current position is any less or more than what the position should be, and if it is off, then have it change it again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top