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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolution

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,<br><br>I have been developing a VB (Vers 6) application at 800*600 resolution, I am looking at distributing this application on terminals with a variety of different resolutions.<br><br>Can somebody please let me know what is required to enable the application to be automatically resized on terminals with different resolutions to my own.<br><br>Thank You
 
in visual basic, you dont need to use an API code, you can just use the Screen Object. <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)
 
mans,<br><br>Karl is correct - the Screen.Height and .Width properties give you a starting point.<br><br>Decide how much of the screen you want to take up with your application and then say something like.<br><br>me.height = int(screen.height/2)<br>me.width = int(screen.width/2)<br><br>in your form_load events.<br><br>Unfortunately that's just the start of things as you then have to resize and reposition the controls (plus fonts) to match the form... There are 3rd party &quot;container&quot; controls that can do this bit for you though. VBFlex is one I think though I haven't used it.<br><br>I used one in VB3 called Elastic (I think) and while that worked reasonable well I did end up developing for a fixed resulution and adding the elastic control at the end - it caused quite a few crashes.<br><br>Let us know if you find a good container control - or post the code (please) if you decide to resize everything yourself &lt;grin&gt;<br><br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.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?"
 
Mike,<br>&nbsp;&nbsp;&nbsp;Instead of <br><br>me.height = int(screen.height/2)<br>me.width = int(screen.width/2)<br><br>you can use<br><br>me.height = screen.height\2<br>me.width = screen.width\2<br><br>\ does integer division.<br><br><br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
I always forget about &quot;\&quot; &lt;s&gt; thx nick <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.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?"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top