473,626 Members | 3,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get and Set screen resolution

My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at runtime?
Thanks
Bill
Nov 21 '05 #1
4 22084
Hi Bill,
My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at
runtime? Thanks


You can get the screen resolution with

Screen.PrimaryS creen.Bounds ...

To change the screen resolution you need Windows API. But you shouldn't do
it, the resolution of the screen is something you should never touch.

Regards,

Frank Eller
www.frankeller.de
Nov 21 '05 #2
Bill,

Here a link I saw that was provided in a message by Terry in this newsgroup.

http://www.omniscium.com/index.asp?p...reenResolution

I hope this helps,

Cor
Nov 21 '05 #3
"Bill Nguyen" <bi************ *****@jaco.com> schrieb:
My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at runtime?


Monitor size:

'SystemInformat ion.PrimaryMoni torSize'
'SystemInformat ion.WorkingArea '
'SystemInformat ion.VirtualScre en'
'Screen.Primary Screen.Bounds'
'Screen.Primary Screen.WorkingA rea'

When using multiple monitors:

'Screen.AllScre ens'
Changing the screen resolution
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=setscreenre solution&lang=e n>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Bill Nguyen" <bi************ *****@jaco.com> wrote in message
news:u%******** ********@tk2msf tngp13.phx.gbl. ..
My VB.Net app requires a minimum monitor resolution of 1024 x 768.
That's rather forward of you. Personally, I'd be asking

"What is the minimum monitor resolution [likely to be] used by
my user community?"
How to ... set it to the minimum at runtime?


You don't, even if you could assume that every monitor running
your application could [properly] support the resolution you want.

Users choose their screen resolution based on their physical
requirements (or esoteric leanings or just plain bl**y-minded
awkwardness); your applications, PITA though it may be,
should honour this.

Regards,
Phill W.
Nov 21 '05 #5

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

Similar topics

1
11055
by: ZaGras | last post by:
when my vb program run on another computer instead of my computer, the user interface is biggger..this is because of the screen resolution... anyone know how to solve pls?
5
4402
by: Chris | last post by:
After exhausting my search on the MS website, I can't find a straight answer. I fin dit hard to believe that MS left our something so useful in ASP.NET as screen resolution detection. Problem: I would like to detect, get values for, the screen resolution in px but in a code behind. Is this possible? There is a System.Windows.Forms.Screen class for the Windows client side, why are there none for browser/ASP.NET client?
4
15504
by: pjac | last post by:
I need some help with some VB language that will change the screen resolution on a monitor when a MS-Access 2000 database is opened from 1024 x 768 to 800 x 600. Any help with this effort would be deeply appreciated. Thanks in advance....
1
2168
by: fabrice | last post by:
Hi, I'm trying to get the screen resolution of the client and to realize a treatment in code behind. it seem to be hard. I can get information about the resolution with this following sub, call in Page_Load.I fix the text of The Control Label. But no treatment is possible. If i try to keep out the text of this label in code behind, i have nothing. The variable is empty.
6
2674
by: Darian | last post by:
I am wondering how (if it is possible of course) I can change a users screen resolution to a certain size when running my application and then change it back when they exit my application. For instance, if the users screen size is 800x600, I want the resolution to change to 1260x780 when running my program and then change back to 800x600 when exiting my program. Thanks, Darian
7
8094
by: tim | last post by:
can someone tell me which function returns the screen resolution in java script?
5
6198
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in either resolution 800 X 600 or 1152 X 864 it takes up the entire explorer size. In screen resolution 800 X 600, if I insert a pictures of 24 X 24 pixel in the cells it takes up the entire cell size (ideally it should as the cell size is also 24 X...
9
3896
by: Steve Wright | last post by:
Hi I'm developing a webpage that needs to include a different stylesheet depending on the screen resolution. I know that I could read the resolution in javascript and then do some sort of stylesheet switcher as part of the onload event but I would rather link in the correct stylesheet for the resolution in the first place.
1
2499
by: nasima khan | last post by:
Hi, i am nasima. I have got a code for setting the screen resolution of my page, but i am unable to understand. Can any one give a complete data explanation of the below code. Sub ChangeRes(X As Long, Y As Long, Bits As Long) Dim DevM As DEVMODE, ScInfo As Long, erg As Long, an As VbMsgBoxResult 'Get the info into DevM erg = EnumDisplaySettings(0&, 0&, DevM) 'This is what we're going to change DevM.dmFields =...
7
1374
by: Peter Oliphant | last post by:
In today's market, what's a good screen resolution that I can pretty much count on as being the minimum? This is kind of a 'fuzzy' question in that I'm interested in the biggest screen resolution that I can be pretty sure most people who buy a computer today (within the last year or two) will have a graphic card that supports it. For example, is 1024 x 768 x 32bits pretty much supported on most PC computers today?
0
8269
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...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8512
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...
0
7203
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
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
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
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.