Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

Having given up on :

http://www.xtremedotnettalk.com/showthread.php?t=88898

 

I have decided to abandon the idea of printing it correctly and just copying it to "LPT1:" via

File.Copy (strFileName, "LPT1:")

 

My question is how would i retrieve a list of ports?

 

I can get a list of printers by :

 

       ' Shutdown the painting of the ListBox as items are added.
       cmb_Printer.BeginUpdate()
       For i As Integer = 0 To PrinterSettings.InstalledPrinters.Count - 1
           cmb_Printer.Items.Add((UCase(PrinterSettings.InstalledPrinters.Item(i))))
       Next

       ' Allow the DropDownBox to repaint and display the new items.
       cmb_Printer.EndUpdate()

 

Thanks in advance.

Posted

Have a look at WMI, remember to add the system.management.dll as a referance to your project.

 

With WMI You can get information on any part of the machine and what is running on it, and with the correct permissions you can do this on remote machines as well.

 

Anybody???

Glenn "Mykre" Wilson, DirectX MVP

Inner Realm

Managed DirectX and Game Programming Resources

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...