Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
Const DC_PAPERS = 2
Private Declare Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, ByVal lpPort As String, ByVal iIndex As Long, lpOutput As Any, lpDevMode As Any) As Long
Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim Ret As Long, PaperSizes() As Integer
    Ret = DeviceCapabilities(Printer.DeviceName, "LPT1", DC_PAPERS, ByVal 0&, ByVal 0&)
    ReDim PaperSizes(1 To Ret) As Integer
    Call DeviceCapabilities(Printer.DeviceName, "LPT1", DC_PAPERS, PaperSizes(1), ByVal 0&)
    Me.AutoRedraw = True
    Me.Print "Supported papersizes:"
    Dim Cnt As Long
    For Cnt = 1 To Ret
        Me.Print Str$(PaperSizes(Cnt))
    Next
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/