• 0

[VB6] printing image from imagebox


Question

hey guys,

i?m working with VB6 atm trying to get a image printed when clicking on a button but just cant get it working, heres what i got:

imgVM is my imagebox

If imgVM.Picture = Empty Then
    Exit Sub
Else
    Printer.Print imgVM.Picture
    Printer.EndDoc
End If
End Sub

but that doesnt work, someone told me to try with Print.PaintPicture instead of Printer.Print but that doesnt work either, someone know the proper way?...dont tell me to google as i?ve done that before pffff

thanks in the meanwhile

Link to comment
https://www.neowin.net/forum/topic/285068-vb6-printing-image-from-imagebox/
Share on other sites

3 answers to this question

Recommended Posts

  • 0

yes, i got

Printer.PaintPicture imgVM.Picture

now, it still doesnt work , says: Compile Error Argument not optional

i?ve looked up in the object browser, and the default syntax for PaintPicture is :

Sub PaintPicture(Picture As StdPicture, X1 As Single, Y1 As Single, [Width1], [Height1], [X2], [Y2], [Width2], [Height2], [Opcode])

but i still dont got a clue how i?d should write t pffff , any help appreciatedi

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.