473,614 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to detect display type?

yxq
Hi
I want to detect user display type, LCD or CRT, how to do?

Thanks

Nov 20 '05 #1
15 3425
Cor
Hi yxq,

Mostly Herfried knows this kind of things direct, but I saw he was late very
busy in this newsgroup yesterday, so maybe it will be to late for you when
he sees your question.

I cannot find it for a display, but I gues you can start by looking for the
information in the managementobjec t with win32_ . I can find the references
to disks but not directly to displays> I hope that someone else will bring
us further on the route or maybe yourself when you look meanwhile.

I thought I send you this to bring you on the route.

I am not sure if it is there, but probably it is.

Cor
Nov 20 '05 #2
"yxq" <ga***@163.ne t> schrieb
Hi
I want to detect user display type, LCD or CRT, how to do?

Thanks


If MsgBox( _
"Do you read this on an LCD?", _
MsgBoxStyle.Yes No Or MsgBoxStyle.Que stion) _
= MsgBoxResult.Ye s Then

MsgBox("You own an LCD")
Else
MsgBox("You must have a CRT")
End If
Sorry, I don't have a better answer.

--
Armin

Nov 20 '05 #3
* "Cor" <no*@non.com> scripsit:
Mostly Herfried knows this kind of things direct, but I saw he was late very
busy in this newsgroup yesterday, so maybe it will be to late for you when
he sees your question.
A spammer tried to annoy people in this group yesterday. I tried to
send him an email but his email address was invalid. I will make an
abuse report if he contunues spamming.
I cannot find it for a display, but I gues you can start by looking for the
information in the managementobjec t with win32_ . I can find the references
to disks but not directly to displays> I hope that someone else will bring
us further on the route or maybe yourself when you look meanwhile.


'Win32_DesktopM onitor' provides a 'DisplayType' property, but I think
that won't include the information the OP wants.

<http://msdn.microsoft. com/library/en-us/wmisdk/wmi/win32_desktopmo nitor.asp>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Cor
> A spammer tried to annoy people in this group yesterday. I tried to
send him an email but his email address was invalid. I will make an
abuse report if he contunues spamming.


No really?

Terrible Herfried, but you don't have is email adres, so that will be
dificult.

:-))

Cor
Nov 20 '05 #5
* "Cor" <no*@non.com> scripsit:
A spammer tried to annoy people in this group yesterday. I tried to
send him an email but his email address was invalid. I will make an
abuse report if he contunues spamming.
No really?


That's the horrible truth.
Terrible Herfried, but you don't have is email adres, so that will be
dificult.


_You_ are _not_ the spammer. I stopped trying to integrate the spammer
into the community, he won't change his habits. I tried to contact the
spammer by mail, but it didn't work. If he will continue spamming, I
will make s spam report to prevent him from annoying the members of the
community.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Cor
> _You_ are _not_ the spammer. I stopped trying to integrate the spammer
into the community, he won't change his habits. I tried to contact the
spammer by mail, but it didn't work. If he will continue spamming, I
will make s spam report to prevent him from annoying the members of the
community.


I never thought you would even think about me in that and you can easily
find my e-mail adres

I saw a very long thread, from two posters who probably where trying to
brake the record from Nak and Fergus this night?



Nov 20 '05 #7
Cor
Herfried,
I was trying to find a solution for the OP to find the display unit.

(It cannot be that difficult, now i have seen there is CMI_... too).

I got an errror using the Object.get methode, I did want to do it on another
way accoording to samples in/on msdn.

But I find in all samples pieces of ththis kind of Visual Basic code they
say.

Dim opt As New GetObjectOption s(null, true)
Dim o As New ManagementObjec t("root\MyNames pace", "MyClass.Name=" "abc""",
opt);

Do you know what is the meaning of this?

This is in a lot of places in msdn with the managementobjec t class.
(And the ; is for real not added by me, but the biggest problem for me is, I
cannot find the constructor of GetOpjectOption s because I could not find one
with 2 parameters).

And because I have to find things using that myClass.name="" , I cannot use
the object browser I think.

Cor
Nov 20 '05 #8
* "Cor" <no*@non.com> scripsit:
I got an errror using the Object.get methode, I did want to do it on another
way accoording to samples in/on msdn.

But I find in all samples pieces of ththis kind of Visual Basic code they
say.

Dim opt As New GetObjectOption s(null, true)

^^^^^^^^^^^^^^^ ^

Shouldn't that read 'ObjectGetOptio ns'?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9
* "Cor" <no*@non.com> scripsit:
_You_ are _not_ the spammer. I stopped trying to integrate the spammer
into the community, he won't change his habits. I tried to contact the
spammer by mail, but it didn't work. If he will continue spamming, I
will make s spam report to prevent him from annoying the members of the
community.


I never thought you would even think about me in that and you can easily
find my e-mail adres

I saw a very long thread, from two posters who probably where trying to
brake the record from Nak and Fergus this night?


ACK. I tried to stop a "spammer" but as you can see he posted about 20
equal messages. This behavior cannot be tolerated any more because lots
of visitors will be annoyed by the large amount of OT discussion.

Please mark OT posts with an "OT" at the beginning of the subject
in order to keep track on how many of the posts are not related to the
topic of this group (Visual Basic .NET programming). And: Don't feed
the trolls. I did this for a long time because I believed that people
can change their habits to integrate smoothly with the community, but
now I know I was wrong with my opinion.

Just my 2 cents.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10

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

Similar topics

7
10067
by: Szar | last post by:
JS noob. I've seen plenty of browser detection scripts but they all seem to be slightly different and don't really fit my needs. I have various places where if the browser is IE I'd like to display else . For example, if a browser is IE I want to use this CSS file otherwise use a different one and if it's IE make this cell x pixels high else make it y pixels high. I'm sure this is easy, please excuse my stupidity. Steve.
39
8650
by: David Jubinville | last post by:
Hi All, I've run into a bit of an interesting problem with CSS and font DPI and would certainly welcome help. Problem: Page layout defined in CSS has font size issues (overlapping frames, text overflowing out of popup window, etc) on a windows systems using 120dpi fonts (large fonts), but everything looks perfect in 96dpi small fonts.
6
3996
by: Stephane Belzile | last post by:
Is there a way I can detect in vb.Net the power has switched to a UPS unit in case of power failure? Thanks
12
2386
by: Kevin Blount | last post by:
I'm playing with dragable <DIV>s, being inspired by google.com/ig, where you can move items on the page around and have items you move over change position if necessary. I have 3 div's setup, one for each dragable item (boxes about 100x150px), inside another div that sets up a border. my script is instigated by an onMouseOver event and works great for moving items, setting the opacity, etc. The only trouble is (and I guess I should...
3
1404
by: Matthias Kwiedor | last post by:
Hi! I want to display a Tooltip at a ListView, when the Text in a Column won't fit. I know ho to display the Tooltip, but how can i detect if a Text fits into a Column or is cuttet with "..."? Regards
9
11584
by: Rich | last post by:
Please help. Looking for a script to detect and display what version of Windows a user is running. Thanks in advance. Rich
2
1634
by: sylvain | last post by:
is there a simple way to detect a web window closing when the user hit the X of the browser ? I want to display a message to the user when he goes out of my web page. I try to detect it by using the event window.unbeforeunload but this event is fire when the page is postback...
8
376
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I detect Opera/Netscape/IE? ----------------------------------------------------------------------- The « navigator » object contains strings which specify the browser and version; however, this is in general not very genuine. Mozilla (and therefore Netscape 6+) allows this to be freely set, and Opera and IE allow it to be modified. There are...
4
7177
by: goscottie | last post by:
I used submodal as my popup window. With some tweaks, it working great in my app. However, I can't find a way to detect session timeout in the popup window. The app is a form based authentication so the default.aspx page will show up in the popup. So I'm looking into several options. 1. detect session timeout in javascript so that I prevent the popup from even happening. I can simply redirect or post to itself so that the calling...
0
8182
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
8627
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8279
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
8433
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
6088
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
5540
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
4052
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
4127
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
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.