469,900 Members | 1,513 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

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 3261
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Szar | last post: by
39 posts views Thread by David Jubinville | last post: by
6 posts views Thread by Stephane Belzile | last post: by
3 posts views Thread by Matthias Kwiedor | last post: by
9 posts views Thread by Rich | last post: by
2 posts views Thread by sylvain | last post: by
8 posts views Thread by FAQ server | last post: by
4 posts views Thread by goscottie | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.