Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

In VB6 you could access the printer fonts with Printer.FontCount and Printer.Fonts().

 

Is their a similar functionality in .NET? If so, where can I find it?

 

Specifically I'm trying to print to a Dot Matrix printer. The dot matrix printer fonts do not get listed when the fonts are enumerated into a listbox. Now I'm trying to select the font through code by selecting the dot matrix printer and then setting the font.

 

I've tried:

   dlg.Document = pd
   Dim result As DialogResult = dlg.ShowDialog()
   printFont = New Font("Draft10cpi", 10)

 

and

   dlg.Document = pd
   Dim result As DialogResult = dlg.ShowDialog()
   printFont = New Font("Draft 10cpi", 10)

 

but when I did:

Console.WriteLine(printFont.ToString)

Both returned San Serif.

Edited by rustyd
rustyd

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