Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

Problema al Imprimir un objeto

Estas en el tema de Problema al Imprimir un objeto en el foro de Visual Basic clásico en Foros del Web. Tengo este codigo para imprimir el interior de un picture pero no se porke los las etiquetas label no aparecen al imprimir. Como lo areglo? ...
  #1 (permalink)  
Antiguo 08/12/2005, 06:14
 
Fecha de Ingreso: diciembre-2004
Mensajes: 371
Antigüedad: 19 años, 4 meses
Puntos: 0
Problema al Imprimir un objeto

Tengo este codigo para imprimir el interior de un picture pero no se porke los las etiquetas label no aparecen al imprimir.

Como lo areglo?
O si conoceis algun metodo mejor?

Gracias un saludo.




Dim varivalue As Integer
Dim vari As Integer
Dim contregis As Integer
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_PAINT = &HF
Private Const WM_PRINT = &H317
Private Const PRF_CLIENT = &H4&
Private Const PRF_CHILDREN = &H10&
Private Const PRF_OWNED = &H20&
Public Sub Imprimir_Click()
Dim rv As Long
Dim ar As Boolean
With Box
ar = FrmDatosClientes.Picture1.AutoRedraw
FrmDatosClientes.Picture1.AutoRedraw = True
'Printer.Orientation = 2
Printer.PrintQuality = 300
Printer.Print
rv = SendMessage(FrmDatosClientes.Picture1.hwnd, WM_PAINT, FrmDatosClientes.Picture1.hDC, 0)
rv = SendMessage(FrmDatosClientes.Picture1.hwnd, WM_PRINT, FrmDatosClientes.Picture1.hDC, _
PRF_CHILDREN Or PRF_CLIENT Or PRF_OWNED)
FrmDatosClientes.Picture1.Picture = FrmDatosClientes.Picture1.Image
Printer.PaintPicture FrmDatosClientes.Picture1.Picture, x, Y
Printer.EndDoc
FrmDatosClientes.Picture1.Line (0, 0)-(FrmDatosClientes.Picture1.ScaleWidth, FrmDatosClientes.Picture1.ScaleHeight), FrmDatosClientes.Picture1.BackColor, BF
FrmDatosClientes.Picture1.AutoRedraw = ar
End With
End Sub
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:47.