Forums - C# Corner

Forum guidelines


  • 718
  • 44
  • 29.3k

convert papersource.sourcename to papersource.kind

Dec 20 2012 8:23 AM
I have 2 types of data, in the namespace System.Drawing.Printing:

Papersource.sourceName and Papersource.Kind.

SourceName gets the name og the papertrays from a printer, like "tray 1"

Kind gets the int value from the printer so fx. tray 1 have a kind value of 258.

in my combobox i only want to show the sourcenames, but if i choose "tray 1" i want to get a messagebox where i get the kind value of the sourcename.

Does anyone understand and have a example :)

Answers (10)

Cloud & IoT DevCon16


Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.