473,505 Members | 14,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect Screen Resolution

Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?

Thanks in advance,
*** Sent via Developersdex http://www.developersdex.com ***
Jun 2 '06 #1
3 4327
A. Gaubatz wrote:
Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?

Thanks in advance,
*** Sent via Developersdex http://www.developersdex.com ***


Dim ScrnRes As Rectangle = Screen.PrimaryScreen.Bounds
Dim W As Integer = ScrnRes.Width
Dim H As Integer = ScrnRes.Height

Also remember -

Dim ScrnRes As Rectangle = Screen.PrimaryScreen.WorkingArea

Hope this helps

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Jun 2 '06 #2
If you are using .Net 2.0, you can use:

My.Computer.Screen.PrimaryScreen.Bounds.Height
My.Computer.Screen.PrimaryScreen.Bounds.Width

--
--ewok
MCSA+M,MCSE, MCSD, MCDBA,MCITP
"A. Gaubatz" wrote:
Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?

Thanks in advance,
*** Sent via Developersdex http://www.developersdex.com ***

Jun 2 '06 #3
Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Jun 2 '06 #4

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

Similar topics

7
14516
by: Michael Hill | last post by:
I have a perl script that i use to render a html page. In that page i call out a stylesheet. If the user has a 800x600 display the fonts are really too big. Since screen resolution is a function...
157
16241
by: Dennis | last post by:
Is there some way --using, say, DOM or javascript-- to detect the current pixel width and/or height of a relatively sized table or of one of its columns or rows. I'm going to be writing javascript...
1
3792
by: simchajoy2000 | last post by:
Is there anyway to dynamically detect the screen resolution of a client's computer in ASP.NET?? All the code I have found on the internet was specifically for Access forms. I found this code: ...
8
2374
by: Brent | last post by:
Does anyone know the best way to detect and track a visitors screen resolution. I know the javascript to detect the users resolution but I am a bit confused on the best way to track and save this....
2
1445
by: EMW | last post by:
I created my page to work on a 800x600 size window, but when the user has his/her screen set on a larger size, they'll get a empty area at the right side of the screen. I don't like this, looks...
3
2007
by: Luis Esteban Valencia | last post by:
Detect screen resolution? IS THAT POSSIBLE? -- LUIS ESTEBAN VALENCIA MICROSOFT DCE 2. MIEMBRO ACTIVO DE ALIANZADEV
3
2351
by: What-a-Tool | last post by:
I recently created an application on my 19" monitor - looked good. Tried running it on a 17 inch monitor - didn't look so good anymore. Is there a way that monitor resolution/screen size can be...
0
1452
by: JaimeM26 | last post by:
Does anyone know how to detect and move/resize the Taskbar in VB.NET? I am able to determine if it is on the top or bottom by comparing the following 2 items. ...
6
2203
by: Steve | last post by:
Hi All I have an on-screen keyboard within a POS program I have written in VB.net 2005, for touch screen computers I have it set to 'always on top' so the user can move the cursor to...
0
7098
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
7367
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...
1
7018
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...
0
7471
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...
0
4699
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...
0
3187
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...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.