Solved

StretchBlt Print

Posted on 1997-05-01
1
220 Views
Last Modified: 2010-07-27
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
Comment
Question by:wilnat
1 Comment
 
LVL 2

Accepted Solution

by:
weekee earned 70 total points
ID: 1425895
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 105
Passing a Text Box name to a Sub 6 99
Added a column screws up code 5 63
backup program with robocopy 6 46
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question