473,748 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting the default Windows screen res.

I have customers who install our product and then set the screen resolution
to a crappy resolution so things don't display on the screen correctly. I'd
like to know what the default monitor setting is set to. I'd also like to
know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to the
computer. I realize this isn't always right but I'd like to know what
windows is reporting.

TIA - Jeff.

Aug 26 '08 #1
3 2158
"Mufasa" <jb@nowhere.com wrote in message
news:#0******** ******@TK2MSFTN GP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

I'm not sure about getting default settings, but the Win32_VideoCont roller,
Win32_DesktopMo nitor, and CIM_VideoContro llerResolution WMI classes have all
kinds of info.

http://msdn.microsoft.com/en-us/libr...12(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...22(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...69(VS.85).aspx
Mark

--
Mark Salsbery
Microsoft MVP - Visual C++

>
TIA - Jeff.
Aug 26 '08 #2
On Aug 26, 1:24*pm, "Mark Salsbery [MVP]"
<MarkSalsbery[MVP]@newsgroup.nosp amwrote:
"Mufasa" <j...@nowhere.c omwrote in message

news:#0******** ******@TK2MSFTN GP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.
I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

I'm not sure about getting default settings, but the Win32_VideoCont roller,
Win32_DesktopMo nitor, and CIM_VideoContro llerResolution WMI classes have all
kinds of info.

http://msdn.microsoft.com/en-us/libr...69(VS.85).aspx

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++


TIA - Jeff.- Hide quoted text -

- Show quoted text -
I once needed to detect screen orientation...
Search for this string Screen.PrimaryS creen.Bounds.He ight
on the following page:
http://msdn.microsoft.com/en-us/libr...norient_topic2
Aug 26 '08 #3
TAB

"Mufasa" <jb@nowhere.com skrev i meddelandet
news:#0******** ******@TK2MSFTN GP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

TIA - Jeff.
Hi

I have used
int screenWidth = SystemInformati on.PrimaryMonit orSize;

That will give you the current width and height .
Have a look other SystemInformati on properties, like MonitorCount and
others.

Aug 27 '08 #4

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

Similar topics

4
4007
by: Sam Smith | last post by:
I am using optparse for the commandline parsing for my programs. I was wondering if it is possible to detect if an option or option-arg has been specified on the commandline by the user or not. Please do not suggest default value solutions. Thanks.
0
2734
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
10
4120
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') != -1 ) {
2
4920
by: Benoit Martin | last post by:
Is it possible to detect a mouse click from a .net service. I want a process running in the background that will detect when the user clicks the mouse button (anywhere on the screen) and executes an action accordingly. All the event handlers for the mouse that I see are for Windows Forms. Is there a way to do it without any controls on the screen? Thanks
2
2322
by: Paul Steele | last post by:
Some time ago I tracked down the code for detecting the shutdown event within a C# program. I tested it, it worked, and I moved on. However, I just discovered that the code is no longer working, and I'm baffled. I've done some more Google searches and have come up with the same thing. A portion of the code is below. I call the HookSessionEnding routine in the Load event of the main form, but the shutdown event code never fires. I'm baffled....
4
2613
by: steve | last post by:
Hi All Using VB net 2005 Professional how can I detect when the windows screen saver starts running Regards Steve
5
6409
by: steve | last post by:
Hi All I have a form set as the splash screen in VB.net 2005 application properties How can I tell when it has or is closing, as I want to then run some licence checking code without the splash screen interfering with msgboxes which may need to be displayed if the licence is invalid or missing I have tried in the splash form's formclosing event but it does not fire
8
5365
by: Bjorn Sagbakken | last post by:
Can screen resolution be detected with server code (in Page_Load) ? I have tried this: public int Width = Convert.ToInt32(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width); public int Height = Convert.ToInt32(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height); and sure enough, I get a couple of numbers; Width=1024 and Height=738 when running at 1024x768 - but I also get the same numbers when running at
1
4152
by: Grzegorz Klimsa | last post by:
Hi ! I have a problem wiht detecting resolution of client web browser I prepare several files of css style for different browsers and different resolutions, (such as : Style_1024x768.css ; Styleff_1024x768.css; Style_1280x1024.css ; Styleff_1280x1024.css ) I want to set css style file depends on resolution browser I wrote this script to detect type of browsers, but i don't have any idea
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9376
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...
1
9329
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
9250
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
8247
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
6076
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
4607
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
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
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.