Forums - C# Corner

Forum guidelines
jesper

jesper

  • 712
  • 41
  • 28.9k

convert papersource.sourcename to papersource.kind

Dec 20 2012 8:23 AM
Hey 
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)

C# Corner Hyderabad Developer Conference

SPONSORED BY

Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.