473,372 Members | 941 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,372 software developers and data experts.

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 3394
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 managementobject 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.net> 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.YesNo Or MsgBoxStyle.Question) _
= MsgBoxResult.Yes 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 managementobject 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_DesktopMonitor' 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_desktopmonitor.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 GetObjectOptions(null, true)
Dim o As New ManagementObject("root\MyNamespace", "MyClass.Name=""abc""",
opt);

Do you know what is the meaning of this?

This is in a lot of places in msdn with the managementobject class.
(And the ; is for real not added by me, but the biggest problem for me is, I
cannot find the constructor of GetOpjectOptions 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 GetObjectOptions(null, true)

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

Shouldn't that read 'ObjectGetOptions'?

--
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
Cor
Herfried,

Dim opt As New GetObjectOptions(null, true)

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

I thougth you understand it, the documentation is as far as I can see
complete wrong about this. Or maybe I see something wrong (look again to the
full thread, you skipped to much)

What to do about that. This one I even did not recognize.

This is a part of the managementObject constructor description.

Cor
Nov 20 '05 #11
* "Cor" <no*@non.com> scripsit:
Dim opt As New GetObjectOptions(null, true) ^^^^^^^^^^^^^^^^


I thougth you understand it, the documentation is as far as I can see
complete wrong about this. Or maybe I see something wrong (look again to the
full thread, you skipped to much)

What to do about that. This one I even did not recognize.


You are right, there is no constructor for 'ObjectGetOptions' that
expects two parameters.
This is a part of the managementObject constructor description.


Thanks for pointing that out, I didn't find it when replying to your
previous post. I found the code in the docs and I think that it's wrong
too.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #12
Cor
Hi Herfried,
Please mark OT posts with an "OT" at the beginning of the subject
The only ones in this newsgroup who use OT are Armin and I. I can show you
a tread with not one OT in it and won't tell wich names are there.
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 the sentence above I should remove. With such sentences nobody uses OT
and I find it always bad when posters have to look through post that has
nothing to do with there case but is beside it or sometimes even has nothing
to do with that like this thread we are again building. To help the poster
this post has in my eyes to be marked with OT by the one who start of the OT
thread, so "Check it" who was that.

But you know it, I don't get angry either on you or on Fergus.

Sometimes people maybe have some reasons for their behaviour you cannot see
in a message and then you have to keep quiet about that, your behaviour was
too not all in this.

And in cases with Fergus and you when such things happens ones in a period,
please forget it. My only role was to try to come between you both, but I
did not succeed.

:-(

Cor
Nov 20 '05 #13
* "Cor" <no*@non.com> scripsit:
Please mark OT posts with an "OT" at the beginning of the subject
The only ones in this newsgroup who use OT are Armin and I. I can show you
a tread with not one OT in it and won't tell wich names are there.


I used to include "OT" too and I will do that in future. I know it was
my mistake to forger to include it in the posts to Fergus.
But you know it, I don't get angry either on you or on Fergus.

Sometimes people maybe have some reasons for their behaviour you cannot see
in a message and then you have to keep quiet about that, your behaviour was
too not all in this.
I now know that it would have been better not to try to talk with Fergus
about things he doesn't know anything about. Maybe he will understand
my arguments in some years, I hope that.
And in cases with Fergus and you when such things happens ones in a period,
please forget it. My only role was to try to come between you both, but I
did not succeed.

:-(


:-(

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

That was last night. In a well off-the-road thread. It's best kept there.

You've succumbed to the temptation this time, but - for everyone's
benefit.

========================
Please leave it out of the mainstream.
========================

Thanks.

Fergus
Nov 20 '05 #15
Hi Cor,

Once again I applaud and am comforted by your concern and friendship for
both of us. ;-))

Unfortunately neither Herfried nor myself had, as plainly visible, any
intention of ceasing. Herfried has <almost> as strong a will as me in this
regard.

But, sadly, as is visible today, much less in the way of self-knowledge.

I must add - spam is a meat by-product. Last night we were throwing
custard pies. ;-)

Regards,
Fergus
Nov 20 '05 #16

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

Similar topics

7
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...
39
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,...
6
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
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,...
3
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...
9
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
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...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I detect Opera/Netscape/IE? ----------------------------------------------------------------------- The...
4
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.