Click here to Skip to main content
16,019,107 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to print images on a page in vb6. I am having print option's in 2 different places on same page.

I am completely new to vb6. Could you please help me
Thanks in Advance.

What I have tried:

so i tried to write common method to perform print operation
VB
Private Sub mnuPrintImage_Click()
10        On Error GoTo mnuPrintImage_Click_Error
20        gobjRLItemImage.PrintImage imgItem  
30        Exit Sub

mnuPrintImage_Click_Error:
40        ShowError "frmItem.mnuPrintImage_Click"
End Sub

I tried to use Me.PrintForm ,but when i try to use Me.PrintForm i am getting a popup to save the complete page. but i need to print image directly and don't want to save image in local.
VB
Public Sub PrintImage()
10        On Error GoTo PrintImageError
20        me.printform
30        Exit Sub

PrintImageError:
40        Select Case Err.Number
              Case 440:
                  ' Cancel button pressed; do nothing
50            Case Else
60                Err.Raise Err.Number
70        End Select
End Sub
Posted
Updated 29-Mar-18 23:19pm
v4
Comments
Richard MacCutchan 30-Mar-18 4:32am    
Stop what you are doing and switch to VB.NET. VB6 was dead years ago.
suniti dinesh 30-Mar-18 4:37am    
Hi Richard, I got an issue in vb application, I am actually working on classic asp. my colleague is not available so pick up this issue. so please help me how print operation can be done in this scenario
Richard MacCutchan 30-Mar-18 5:20am    
Sorry, like I said, VB6 is long dead, and I have never used it. Try Google to see if you can find sample code that may help.

1 solution

None of above codes prints an image!

Check this: Utilize VB6's PaintPicture method to create special effects[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900