Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. 'Generate Managed Class'

'Generate Managed Class'

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sentmemail
    wrote on last edited by
    #1

    hi, in .Net i have used 'Generate Managed Class' to generate win32_printer.vb how can i use this class to get all all the printer names on my computer? thanks

    D L 2 Replies Last reply
    0
    • S sentmemail

      hi, in .Net i have used 'Generate Managed Class' to generate win32_printer.vb how can i use this class to get all all the printer names on my computer? thanks

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Just so we're clear about what you're talking about... How did you do this "Generate Managed Class" thing? What was the tool you used and the command line you used to launch it? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Just so we're clear about what you're talking about... How did you do this "Generate Managed Class" thing? What was the tool you used and the command line you used to launch it? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        S Offline
        S Offline
        sentmemail
        wrote on last edited by
        #3

        This is how i got there: Install the WMI Extensions Open Visual Studio New Project Go to Server Explorer / Management Classes Right Click -> Add Class Drill down to root\CIMV2 : Printers Click Add and OK Right click on the new node -> Generate Managed Class -- modified at 21:39 Friday 27th January, 2006

        D 1 Reply Last reply
        0
        • S sentmemail

          This is how i got there: Install the WMI Extensions Open Visual Studio New Project Go to Server Explorer / Management Classes Right Click -> Add Class Drill down to root\CIMV2 : Printers Click Add and OK Right click on the new node -> Generate Managed Class -- modified at 21:39 Friday 27th January, 2006

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          First, toss the "Generated" garbage in the trash. Do it by hand so you can understand what's going on and have greater control over it. It also makes asking and answering questions a whole lot easier.

          Dim searcher As New ManagementObjectSearcher("SELECT \* FROM Win32\_Printer")
          Dim prn As ManagementObject
          For Each prn In searcher.Get()
              Console.WriteLine("Printer Name = " & prn("Name").ToString())
          Next share
          

          RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          • S sentmemail

            hi, in .Net i have used 'Generate Managed Class' to generate win32_printer.vb how can i use this class to get all all the printer names on my computer? thanks

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            http://www.vbcity.com/forums/topic.asp?tid=113495[^]

            D 1 Reply Last reply
            0
            • L Lost User

              http://www.vbcity.com/forums/topic.asp?tid=113495[^]

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Ummm.... The link you posted doesn't have anything to do with returning all the printer names on the machine.....?? :confused: RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups