Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

StretchBlt Print

I am trying to get this code to work and I get "module does not support print method." Here is the code please show corrections and tell me why this is wrong.

Private Sub Command1_Click()

CommonDialog1.ShowPrinter

PrintValue = StretchBlt(Printpic.hDC, Printpic.ScaleLeft, _
Printpic.ScaleTop, Printpic.ScaleWidth, Printpic.ScaleHeight, _
picCal.hDC, picCal.ScaleLeft, picCal.ScaleTop, _
picCal.ScaleWidth, picCal.ScaleHeight, SRCCOPY)

PrintValue.Print

End Sub
##########################################
The Module

Option Explicit

Public PrintValue As String

Declare Function StretchBlt% Lib "GDI32" (ByVal hDC%, ByVal X%, ByVal Y%, _
ByVal nWidth%, ByVal nHeight%, ByVal hSrcDC%, ByVal XSrc%, ByVal YSrc%, _
ByVal nSrcWidth%, ByVal nSrcHeight%, ByVal dwRop&)

Public Const SRCCOPY As Long = &HCC0020


0
wilnat
Asked:
wilnat
1 Solution
 
weekeeCommented:
Doubts1) Does stretchblt return string or integer?2) Your function declaration did not specofy wat sort of datatype the function returns3) Print method use wrongly..should be " print printValue "
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now