Solved

StretchBlt Print

Posted on 1997-05-01
1
209 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now