IMPRIMIR PICTURE OU IMAGE

MAYKONMIC 08/09/2010 15:06:04
#352470
Queria imprimir picture ou image com algumas labels e linhas dentro do controle é possível?
MARCELO.TREZE 08/09/2010 15:16:51
#352472
tente

Private Sub Command1_Click()
Printer.PaintPicture Picture1.Image, 0, 0, Picture1.Width, Picture1.Height
Printer.EndDoc
End Sub

veja se funciona
MAYKONMIC 08/09/2010 16:28:28
#352481
já tentei só q não saem nem labels nem linhas (lines)
MARCELO.TREZE 08/09/2010 17:27:54
#352483
desculpe colega eu não havia entendido a problematica

eu só consigo assim

Private Sub Command1_Click()
Printer.PaintPicture Picture1.Image, 0, 0, Picture1.Width, Picture1.Height
Printer.CurrentX = Label1.Left
Printer.CurrentY = Label1.Top
Printer.FontBold = Label1.Font.Bold
Printer.Font = Label1.Font.Name
Printer.FontSize = Label1.Font.Size
Printer.ForeColor = Label1.ForeColor
Printer.FontTransparent = True
Printer.Print Label1.Caption
Printer.EndDoc
End Sub
MAYKONMIC 08/09/2010 18:04:23
#352484
seria possível imprimir tudo aquilo q está contido no picture ou image ???
Nem que seja salvando o que está dentro do picture salvando uma imagem e posteriormente imprimindo a mesma
MICROSCHEME 08/09/2010 19:37:27
#352492
eu consegui assim


Private Declare Sub keybd_event Lib [Ô]user32[Ô] (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Sub Form_Activate()
Picture001.Line (500, 500)-Step(8100, 5200), , B [ô] Impressão de um retângulo no formulário em Picture001
Picture001.CurrentX = 1000
Picture001.CurrentY = 1000
Picture001.Print [Ô] Impressão de Retângulo e Texto dentro do Retângulo[Ô]
Picture001.CurrentX = 1000
Picture001.CurrentY = 2000
Picture001.Print [Ô] Pressionado a Tecla F12 a Tela Será Salva como FrmPrintScreen.Jpg[Ô]
Picture001.CurrentX = 1000
Picture001.CurrentY = 2200
Picture001.Print [Ô] Que Nada Mais é Que o Nome do Form Atual + a Extenção .Jpg[Ô]
End Sub

Private Sub Form_Load()
Clipboard.Clear
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF12 Then
PicCopy001.AutoSize = True
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents
PicCopy001.Picture = Clipboard.GetData(vbCFBitmap)
SavePicture PicCopy001.Image, App.Path & [Ô]\[Ô] & Me.Name & [Ô].Jpg[Ô]
End If
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = vbKeyEscape Then
Unload Me
End If
End Sub

Teclando F12 salva a tela inteira com os objetos
Se não me engano as coordenadas do comando keybd_event vbKeySnapshot, 0, 0, 0 podem ser alteradas
pra salvar tua image e depois recuperá-la numa picture e imprimir

Pequise que também vou pesquisar a respeito

blz . . .

MICROSCHEME 08/09/2010 20:21:38
#352494
Acredito que tu vai precisar procurar pela api BitBlt pra trabalhar com parte da tela ao invés da tela inteira como no meu caso

blz . . .

GERARDA 08/09/2010 20:33:10
#352495
testa ai porque estou sem tinta
MAYKONMIC 08/09/2010 22:43:41
#352499
Muito Obrigado já testei a sua hipotese gerarda e gostei simples de implementar, porém a qualidade [Ô]da imagem[Ô] deixou um pouco a desejar, não teria como melhorar: salvar em outro formato ou sei lá, mas msm assim foi muito útil é provável q possa usar muito grato gerarda, e os outros não se preocupem vou testar uma a uma das alternativas oferecidas basta tempo.
Tópico encerrado , respostas não são mais permitidas