Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/03/2011, 17:09
lvwrz
Usuario no validado
 
Fecha de Ingreso: mayo-2005
Ubicación: Benicàssim
Mensajes: 56
Antigüedad: 18 años, 10 meses
Puntos: 0
Exclamación Respuesta: Impresion Matricial en Visual Studio 2010

hola osvier, gracias por tu respuesta!


Adventencia 1
Lo tu dices de
Cita:
trata de inicializar tu objeto antes de usarlo.
Te cito código anterior, es válido esto o debo hacerlo tal como tu dices?
Código vb:
Ver original
  1. MiObjeto obj = new MiObjeto();


Código anterior:
Código vb:
Ver original
  1. Dim di As DOCINFOW ' Describes your document (name, port, data type).
  2.        Dim dwWritten As Int32 ' The number of bytes written by WritePrinter().
  3.        Dim bSuccess As Boolean ' Your success code.
  4.  
  5.         ' Set up the DOCINFO structure.
  6.        With di
  7.             .pDocName = "My Visual Basic .NET RAW Document"
  8.             .pDataType = "RAW"
  9.         End With


Advertencia 2
Copio Function:
Código vb:
Ver original
  1. Public Shared Function SendStringToPrinter(ByVal szPrinterName As String, ByVal szString As String)
  2.         Dim pBytes As IntPtr
  3.         Dim dwCount As Int32
  4.         ' How many characters are in the string?
  5.        dwCount = szString.Length()
  6.         ' Assume that the printer is expecting ANSI text, and then convert
  7.        ' the string to ANSI text.
  8.        pBytes = Marshal.StringToCoTaskMemAnsi(szString)
  9.         ' Send the converted ANSI string to the printer.
  10.        SendBytesToPrinter(szPrinterName, pBytes, dwCount)
  11.         Marshal.FreeCoTaskMem(pBytes)
  12.     End Function

No tengo ningún IF dentro de mi function, no lo tengo tan claro.

Mil disculpas por mi ignorancia, es que soy más de PHP/MySQL que de .NET