Home > Software engineering >  VB problem for help behind the End attribute can only appear comments
VB problem for help behind the End attribute can only appear comments

Time:10-09

In the scarlet letter shown behind the end attribute can only display comments
Private Sub cmdPrint_Click ()
Option Explicit
Private Const CCHDEVICENAME=32
Private Const CCHFORMNAME=32
Private Const GMEM_FIXED=& amp; H0
Private Const GMEM_MOVEABLE=& amp; The H2
Private Const GMEM_ZEROINIT=& amp; H40
Private Const DM_DUPLEX=& amp; H1000 & amp;
Private Const DM_ORIENTATION=& amp; H1 & amp;
'
'- API TYPES DEFINITION
'
Private Type PRINTDLG_TYPE
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
HInstance As Long
LCustData As Long
LpfnPrintHook As Long
LpfnSetupHook As Long
LpPrintTemplateName As String
LpSetupTemplateName As String
HPrintTemplate As Long
HSetupTemplate As Long
End Type
Private Type DEVNAMES_TYPE
WDriverOffset As Integer
WDeviceOffset As Integer
WOutputOffset As Integer
WDefault As Integer
Extra As String * 100
End Type
Private Type DEVMODE_TYPE
DmDeviceName As String * CCHDEVICENAME
DmSpecVersion As Integer
DmDriverVersion As Integer
DmSize As Integer
DmDriverExtra As Integer
DmFields As Long
DmOrientation As Integer
DmPaperSize As Integer
DmPaperLength As Integer
DmPaperWidth As Integer
DmScale As Integer
DmCopies As Integer
DmDefaultSource As Integer
DmPrintQuality As Integer
DmColor As Integer
DmDuplex As Integer
DmYResolution As Integer
DmTTOption As Integer
DmCollate As Integer
DmFormName As String * CCHFORMNAME
DmUnusedPadding As Integer
DmBitsPerPel As Integer
DmPelsWidth As Long
DmPelsHeight As Long
DmDisplayFlags As Long
DmDisplayFrequency As Long
End Type
'
'- API DECLARATIONS
'
Private Declare Function PrintDialog Lib "comdlg32. DLL" Alias "PrintDlgA" _
(pPrintdlg As PRINTDLG_TYPE) As Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(hpvDest As Any, _
HpvSource As Any, _
ByVal cbCopy As Long)
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" _
(ByVal hMem As Long) As Long
Private Declare Function GlobalAlloc Lib "kernel32" _
(ByVal wFlags As Long, _
ByVal dwBytes As Long As Long)
Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
'
'- PUBLIC ENUM
'
Public Enum PrinterConstants
CdlPDAllPages=& amp; H0
CdlPDCollate=& amp; H10
CdlPDDisablePrintToFile=& amp; H80000
CdlPDHelpButton=& amp; H800
CdlPDHidePrintToFile=& amp; H100000
CdlPDNoPageNums=& amp; H8
CdlPDNoSelection=& amp; H4
CdlPDNoWarning=& amp; H80
CdlPDPageNums=& amp; The H2
CdlPDPrintSetup=& amp; H40
CdlPDPrintToFile=& amp; H20
CdlPDReturnDC=& amp; H100
CdlPDReturnDefault=& amp; H400
CdlPDReturnIC=& amp; H200
CdlPDSelection=& amp; H1
CdlPDUseDevModeCopies=& amp; H40000
End Enum
Public Enum ErrorConstants
CdlCancel=32755
End Enum
'
'- PRIVATE VARIABLES
'
Private intMinPage As Integer 'Local copy of Min
Private intMaxPage As Integer 'Local copy of Max
Private intFromPage As Integer 'Local copy of FromPage
Private intToPage As Integer 'Local copy of ToPage
'N.B. 0 & gt;=Min & gt;=FromPage & gt;=ToPage & gt;=Max
'If Max=0, then no limits.
'
'- PUBLIC VARIABLES
'
Public Flags As PrinterConstants
Public CancelError As Boolean
'
'-- the INITIALIZE
'
Private Sub Class_Initialize ()
IntMinPage=0
IntMaxPage=0
IntFromPage=0
IntToPage=0
CancelError=False
End Sub
'
'-- PUBLIC MEMBERS
'
Property Get Min () As an Integer
Min=intMinPage
End Property
The Property Let Min (ByVal intNewValue As Integer)
IntNewValue=https://bbs.csdn.net/topics/IIf (intNewValue> 0, intNewValue, 0)
IntMinPage=intNewValue
If intNewValue & gt; IntFromPage Then _
IntFromPage=intNewValue
If intNewValue & gt; IntToPage Then _
IntToPage=intNewValue
If intNewValue & gt; IntMaxPage Then _
IntMaxPage=intNewValue
End Property
The Property Get FromPage () As an Integer
FromPage=intFromPage
End Property
The Property Let FromPage (ByVal intNewValue As Integer)
IntNewValue=https://bbs.csdn.net/topics/IIf (intNewValue> 0, intNewValue, 0)
IntFromPage=intNewValue
If intNewValue & gt; IntToPage Then _
IntToPage=intNewValue
If intNewValue & gt; IntMaxPage Then _
IntMaxPage=intNewValue
If intNewValue & lt; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • API
  • Related