Visual Basic - Convertir STRING a SYSTEM DRAWING FONT

Life is soft - evento anual de software empresarial
 
Vista:

Convertir STRING a SYSTEM DRAWING FONT

Publicado por Ramon (1 intervención) el 14/07/2011 19:15:56
Saludos

tengo una aplicacion en VB express 2010 , en la ual al presionar un boton se manda a imprimir una pequeña etiqueta con 3 lineas.

LINEA 1 : fecha+hora
LINEA 2: PASS
LINEA 3: ETIQUETA

cada una de esas 3 lineas la mando a imprimir con la siguiente instrucción:

Private Sub PrintPageHandler(ByVal sender As Object, ByVal args As Printing.PrintPageEventArgs)
Dim s As String

s = DateTime.Now & vbCrLf
s = New System.Drawing.Font("Verdana", 16.0F, FontStyle.Regular)

'args.Graphics.DrawString(s, New Font(New Font(FontFamily.GenericSansSerif, 6), FontStyle.Regular), Brushes.Black, 10, 10)
s = "PASS" & vbCrLf
args.Graphics.DrawString(s, New Font(New Font(FontFamily.GenericSansSerif, 8), FontStyle.Bold), Brushes.Black, 10, 20)
s = "W166 " & PartLocation & " "
s &= PartSelectionForLabel
args.Graphics.DrawString(s, New Font(New Font(FontFamily.GenericSansSerif, 6), FontStyle.Regular), Brushes.Black, 10, 33)
End Sub

Sin embargo quiero hacer una modificación.

En la primera linea, donde imprimo la fecha y la hora , en lugar de imprimirla con tipo de letra "leible" quiero que se imprima en CODIGO DE BARRAS.

Y instale el tipo de letra "code39" en mi galeria de ttf de windows y la intento llamar con la funcion: System.Drawing.Font

pero al momento de compilar me dice "un valor de system.drawing.font no puede convertirse a string"

me pueden ayudar?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder