473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advice on detecting screen resolution and resizing application and its objects

I need to be able to detect different screen resolutions and then
resize my applications forms, objects, fonts etc, to suit.
Any ideas how to go about it?
I use VB 5.
Many thanks in advance.
Jul 17 '05 #1
6 8587
On Wed, 19 May 2004 22:00:02 +1000, dreamer wrote:
I need to be able to detect different screen resolutions and then
resize my applications forms, objects, fonts etc, to suit.
Any ideas how to go about it?
I use VB 5.
Many thanks in advance.


Screen.Width and Screen.Height tell you the resolution.

Private Sub Form_Load()
Me.Height = Screen.Height / 3 'or whatever number
Me.Width = Screen.Width / 3 'you want to use
End Sub

--
auric underscore underscore at hotmail dot com
*****
[blank stare]
Jul 17 '05 #2
Methinks you forgot to include the Screen.TwipsPer PixelX/Y in the demo. :-)
--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

"In VB we had to code our own bugs. In dotnet we can inherit them."
"Auric__" <no*********@em ail.address> wrote in message
news:6d******** *************** *********@4ax.c om...
: On Wed, 19 May 2004 22:00:02 +1000, dreamer wrote:
:
: >I need to be able to detect different screen resolutions and then
: >resize my applications forms, objects, fonts etc, to suit.
: >Any ideas how to go about it?
: >I use VB 5.
: >Many thanks in advance.
:
: Screen.Width and Screen.Height tell you the resolution.
:
: Private Sub Form_Load()
: Me.Height = Screen.Height / 3 'or whatever number
: Me.Width = Screen.Width / 3 'you want to use
: End Sub
:
: --
: auric underscore underscore at hotmail dot com
: *****
: [blank stare]

Jul 17 '05 #3
On Wed, 19 May 2004 21:57:04 GMT, Randy Birch wrote:
Methinks you forgot to include the Screen.TwipsPer PixelX/Y in the demo. :-)


I don't typically use them; I don't usually even bother resizing, I just
set the form at a fixed size. (I'm lazy and evil, I know.)
--
auric underscore underscore at hotmail dot com
*****
[blank stare]
Jul 17 '05 #4
On Wed, 19 May 2004 21:57:04 GMT, "Randy Birch"
<rg************ @mvps.org> wrote:
Methinks you forgot to include the Screen.TwipsPer PixelX/Y in the demo. :-)

Hello Randy,
Could you please give more detail on the Screen.TwipsPer PixelX/Y that
you mention. A sample perhaps?
I am not real flash as a programmer (not even a programmer really) and
I sometimes struggle with the obvious.
Thanks.
Jul 17 '05 #5
Methinks you forgot to include the Screen.TwipsPer PixelX/Y in the
demo. :-) Hello Randy,
Could you please give more detail on the Screen.TwipsPer PixelX/Y that
you mention. A sample perhaps?
I am not real flash as a programmer (not even a programmer really) and
I sometimes struggle with the obvious.


PixelsWide = Screen.Width \ Screen.TwipsPer PixelX
PixelsHigh = Screen.Height \ Screen.TwipsPer PixelY

Rick - MVP

Jul 17 '05 #6
Jim
Your best bet is to use a third party resizer ocx. Sheridan use to
make one that worked well. Sheridan was purchased by Infragistics or
some such. Good luck.

Jim

dreamer <no****@nowhere .com.au> wrote in message news:<3h******* *************** **********@4ax. com>...
On Wed, 19 May 2004 21:57:04 GMT, "Randy Birch"
<rg************ @mvps.org> wrote:
Methinks you forgot to include the Screen.TwipsPer PixelX/Y in the demo. :-)

Hello Randy,
Could you please give more detail on the Screen.TwipsPer PixelX/Y that
you mention. A sample perhaps?
I am not real flash as a programmer (not even a programmer really) and
I sometimes struggle with the obvious.
Thanks.

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2731
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE
1
2857
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE 3) SDL_VIDEORESIZE
4
3235
by: Ronny Sigo | last post by:
Hello all, Ik have made an Access application on my computer which has a screen resolution of 1024 x 768. However the goal is to run it on my girlfriend's computer which has a screen resolution of 800 x 768. Of course on her computer not all of the controls are visible and she must scroll to see them all. Is there a way to adapt this automatically ? Any help very much appreciated. Ronny
3
4791
by: mar10 | last post by:
I've created an access program that's used by 5 people. Two of the individuals have lower screen resolutions that makes it difficult to utilize the program as written Is there any way to reset the resolution when the program opens and when set back upon exiting? It looks like there may be some freeware out there that provides a module that will do this. Anyone have any experience with these, or any other suggestions on how to solve...
2
2939
by: Mustufa Baig | last post by:
Can anybody tell me how or refer me a link where I can find the client side javascript to make the positions and resizing of the controls on .aspx page independent of screen resolution. As I am using Grid layout and it uses pixel units. Thanks.
3
1245
by: dreamer | last post by:
I need to be able to detect different screen resolutions and then resize my applications objects to suit. Any ideas how to go about it? I use VB 5. Many thanks in advance.
4
1557
by: David | last post by:
Could someone please advise how to cope with various screen resolutions that are used when an application is deployed to other machines that have different screen resolutions than the development machine. Should the application be developed in a moderate resolution screen (say 800 x 600) and then have the application switch the target machine to this mode when running ? If so, how would I do this. Or is there a way that the application...
1
9623
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
10
44074
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.