home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 December
/
PCWorld_2002-12_cd.bin
/
Software
/
Topware
/
fprint
/
fpdk400.exe
/
samples
/
vb6
/
FPattr.frm
< prev
next >
Wrap
Text File
|
1999-10-04
|
3KB
|
99 lines
VERSION 5.00
Begin VB.Form FPattributes
AutoRedraw = -1 'True
Caption = "FinePrinter attributes"
ClientHeight = 3165
ClientLeft = 45
ClientTop = 345
ClientWidth = 3750
LinkTopic = "Form1"
ScaleHeight = 3165
ScaleWidth = 3750
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton btnClose
Caption = "Close"
Height = 400
Left = 1320
TabIndex = 0
Top = 2640
Width = 1092
End
End
Attribute VB_Name = "FPattributes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub btnClose_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim result As Long
Dim szFinePrinter As String
Dim hfp As Long
Dim dwDlg As Long
Dim intAttr As Integer
Dim lngAttr As Integer
Dim bAttr As Boolean
Dim strAttr As String
Dim lenAttr As Long
szFinePrinter = vbNullString
result = fpOpen(szFinePrinter, hfp)
If result <> 0 Then
MsgBox "FinePrint Error: " & ErrorText(result)
Exit Sub
End If
intAttr = 0
lenAttr = Len(intAttr)
result = fpGetLayoutAttr(hfp, eliLayout, intAttr, lenAttr)
Me.Print "Layout: " & LayoutTypes(intAttr)
intAttr = 0
lenAttr = Len(intAttr)
result = fpGetLayoutAttr(hfp, eliBorders, intAttr, lenAttr)
Me.Print "Borders: " & BorderTypes(intAttr)
bAttr = False
lenAttr = Len(bAttr)
result = fpGetLayoutAttr(hfp, eliOrder, bAttr, lenAttr)
Me.Print "Order: " & OrderTypes(bAttr)
strAttr = Space(80)
lenAttr = Len(strAttr)
result = fpGetLayoutAttr(hfp, eliStationery, ByVal strAttr, lenAttr)
Me.Print "Stationery: " & Left(strAttr, result - 1)
strAttr = Space(80)
lenAttr = Len(strAttr)
result = fpGetLayoutAttr(hfp, eliForm, ByVal strAttr, lenAttr)
If Trim(Left(strAttr, result - 1)) = "" Then
Me.Print "Form: <None>"
Else
Me.Print "Form: " & Left(strAttr, result - 1)
End If
strAttr = Space(80)
lenAttr = Len(strAttr)
result = fpGetLayoutAttr(hfp, eliDestPrinter, ByVal strAttr, lenAttr)
Me.Print "Destination printer: " & Left(strAttr, result - 1)
lenAttr = Len(intAttr)
result = fpGetLayoutAttr(hfp, eliMargins, intAttr, lenAttr)
Me.Print "Margins: " & MarginTypes(intAttr)
bAttr = False
lenAttr = Len(bAttr)
result = fpGetLayoutAttr(hfp, eliDuplex, bAttr, lenAttr)
Me.Print "Duplex: " & bAttr
lenAttr = Len(lngAttr)
result = fpGetLayoutAttr(hfp, eliCopies, lngAttr, lenAttr)
Me.Print "Copies: " & Unsigned2Signed(lngAttr)
result = FpClose(hfp, False)
End Sub