Private Declare Function printdlg Lib "C:\WINNT\SYSTEM32\comdlg32.dll" Alias "Printdlga" (Pprintdlg As printdlg) As Long
Private Type printdlg
lstructsize As Long
hwndowner As Long
hdevmode As Long
hdevnames As Long
hdc As Long
flags As Long
nFrompage As Integer
nTopage As Integer
nMinpage As Integer
nMaxpage As Integer
nCopies As Integer
nInstance As Long
lCustdate As Long
lPfnsetupHook As Long
lPprinttemplatename As String
lPsetuptemplatename As String
hPrinttemplate As Long
hSetuptemplate As Long
End Type
Private Sub Command1_Click()
Dim P As printdlg
P.lstructsize = Len(P)
P.hwndowner = Me.hWnd
P.nFrompage = 1
P.nTopage = 1
P.nMinpage = 1
P.nMaxpage = 1
P.nCopies = 1
x = printdlg(P)
End Sub
以上是源序程,运行时出现“找不到程序调入口”.
请高手指点!
Private Type printdlg
lstructsize As Long
hwndowner As Long
hdevmode As Long
hdevnames As Long
hdc As Long
flags As Long
nFrompage As Integer
nTopage As Integer
nMinpage As Integer
nMaxpage As Integer
nCopies As Integer
nInstance As Long
lCustdate As Long
lPfnsetupHook As Long
lPprinttemplatename As String
lPsetuptemplatename As String
hPrinttemplate As Long
hSetuptemplate As Long
End Type
Private Sub Command1_Click()
Dim P As printdlg
P.lstructsize = Len(P)
P.hwndowner = Me.hWnd
P.nFrompage = 1
P.nTopage = 1
P.nMinpage = 1
P.nMaxpage = 1
P.nCopies = 1
x = printdlg(P)
End Sub
以上是源序程,运行时出现“找不到程序调入口”.
请高手指点!
"PrintDlgA" (pPrintdlg As PRINTDLG) As Long试试这样写