473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 8573
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.TwipsPerPixelX/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*********@email.address> wrote in message
news:6d********************************@4ax.com...
: 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.TwipsPerPixelX/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.TwipsPerPixelX/Y in the demo. :-)

Hello Randy,
Could you please give more detail on the Screen.TwipsPerPixelX/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.TwipsPerPixelX/Y in the
demo. :-) Hello Randy,
Could you please give more detail on the Screen.TwipsPerPixelX/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.TwipsPerPixelX
PixelsHigh = Screen.Height \ Screen.TwipsPerPixelY

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.TwipsPerPixelX/Y in the demo. :-)

Hello Randy,
Could you please give more detail on the Screen.TwipsPerPixelX/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
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...
1
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...
4
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...
3
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...
2
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...
3
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
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...
1
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...
10
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.