Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

StretchBlt Print

Posted on 1997-05-01
1
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
weekee earned 210 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

688 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