How to detect display type?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yxq

    How to detect display type?

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

    Thanks



  • Cor

    #2
    Re: How to detect display type?

    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


    Comment

    • Armin Zingler

      #3
      Re: How to detect display type?

      "yxq" <gayxq@163.ne t> schrieb[color=blue]
      > Hi
      > I want to detect user display type, LCD or CRT, how to do?
      >
      > Thanks[/color]

      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

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: How to detect display type?

        * "Cor" <non@non.com> scripsit:[color=blue]
        > 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.[/color]

        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.
        [color=blue]
        > 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.[/color]

        '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>

        Comment

        • Cor

          #5
          Re: How to detect display type?

          > A spammer tried to annoy people in this group yesterday. I tried to[color=blue]
          > send him an email but his email address was invalid. I will make an
          > abuse report if he contunues spamming.[/color]

          No really?

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

          :-))

          Cor


          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: How to detect display type?

            * "Cor" <non@non.com> scripsit:[color=blue][color=green]
            >> 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.[/color]
            >
            > No really?[/color]

            That's the horrible truth.
            [color=blue]
            > Terrible Herfried, but you don't have is email adres, so that will be
            > dificult.[/color]

            _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>

            Comment

            • Cor

              #7
              Re: How to detect display type?

              > _You_ are _not_ the spammer. I stopped trying to integrate the spammer[color=blue]
              > 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.[/color]

              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?







              Comment

              • Cor

                #8
                Re: How to detect display type?

                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


                Comment

                • Herfried K. Wagner [MVP]

                  #9
                  Re: How to detect display type?

                  * "Cor" <non@non.com> scripsit:[color=blue]
                  > 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)[/color]
                  ^^^^^^^^^^^^^^^ ^

                  Shouldn't that read 'ObjectGetOptio ns'?

                  --
                  Herfried K. Wagner
                  MVP · VB Classic, VB.NET
                  <http://www.mvps.org/dotnet>

                  Comment

                  • Herfried K. Wagner [MVP]

                    #10
                    OT: Re: How to detect display type?

                    * "Cor" <non@non.com> scripsit:[color=blue][color=green]
                    >> _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.[/color]
                    >
                    > 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?[/color]

                    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>

                    Comment

                    • Cor

                      #11
                      OT: Re: How to detect display type?

                      Herfried,[color=blue][color=green]
                      > >
                      > > Dim opt As New GetObjectOption s(null, true)[/color]
                      > ^^^^^^^^^^^^^^^ ^
                      >[/color]
                      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 managementObjec t constructor description.

                      Cor


                      Comment

                      • Herfried K. Wagner [MVP]

                        #12
                        Re: OT: Re: How to detect display type?

                        * "Cor" <non@non.com> scripsit:[color=blue][color=green][color=darkred]
                        >>> Dim opt As New GetObjectOption s(null, true)[/color]
                        >> ^^^^^^^^^^^^^^^ ^[/color]
                        >
                        > 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.[/color]

                        You are right, there is no constructor for 'ObjectGetOptio ns' that
                        expects two parameters.
                        [color=blue]
                        > This is a part of the managementObjec t constructor description.[/color]

                        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>

                        Comment

                        • Cor

                          #13
                          OT: Re:

                          Hi Herfried,
                          [color=blue]
                          > Please mark OT posts with an "OT" at the beginning of the subject[/color]

                          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.
                          [color=blue]
                          > in order to keep track on how many of the posts are not related to the
                          > topic of this group (Visual Basic .NET programming).[/color]

                          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


                          Comment

                          • Herfried K. Wagner [MVP]

                            #14
                            Re: OT: Re:

                            * "Cor" <non@non.com> scripsit:[color=blue][color=green]
                            >> Please mark OT posts with an "OT" at the beginning of the subject[/color]
                            >
                            > 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.[/color]

                            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.
                            [color=blue]
                            > 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.[/color]

                            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.
                            [color=blue]
                            > 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.
                            >
                            > :-([/color]

                            :-(

                            --
                            Herfried K. Wagner
                            MVP · VB Classic, VB.NET
                            <http://www.mvps.org/dotnet>

                            Comment

                            • Fergus Cooney

                              #15
                              OT

                              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


                              Comment

                              Working...