|
-
Nov 22nd, 2000, 10:18 AM
#1
Thread Starter
Member
I'm using the API Print dialog and it works great, except for one thing: I don't know how to tell if the user has pressed Cancel or not. Here's some code:
Code:
'API Printer Dialog
Dim tPrintDlg As PrintDlg
tPrintDlg.lStructSize = Len(tPrintDlg)
tPrintDlg.hwndOwner = Me.hWnd
tPrintDlg.hdc = hdc
tPrintDlg.flags = 0
tPrintDlg.nFromPage = 0
tPrintDlg.nToPage = 0
tPrintDlg.nMinPage = 0
tPrintDlg.nMaxPage = 0
tPrintDlg.nCopies = 1
tPrintDlg.hInstance = App.hInstance
lpPrintTemplateName = "Print Page"
Dim a
a = PrintDlg(tPrintDlg)
'Printing Code
The Declarations are all correct and the dialog pops up, but when the user presses cancel, it does not set an error like the OCX and I can't find which flags it changes! HELP ME....please?
Thanks!
-
Nov 22nd, 2000, 11:20 AM
#2
Frenzied Member
Code:
If a <> 0 then
'the user didn't press cancel
End If
-
Nov 22nd, 2000, 11:44 AM
#3
Thread Starter
Member
oh.....yeah
oh....how....easy. DUH! Thanks a bunch!
Boy, is my face red!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|