Sub Command3_Click()
Dim a5 As Long, a6 As Long
Me.Show
Form1.Cls
Form1.Caption = " other info.."
Dim szprinter$
szprinter$ = Space$(128)
a = GetProfileString("windows", "device", "", szprinter$, 64)
a1$ = Left$(szprinter$, a): a2 = InStr(a1$, ",")
print_device$ = Left$(a1$, a2 - 1)
Print "Printer = ", print_device$
a3$ = Mid$(a1$, a2 + 1): a4 = InStr(a3$, ",")
driver$ = Left$(a3$, a4 - 1)
Print "Driver = ", driver$
Port$ = Mid$(a1$, a2 + a4 + 1)
Print "Port = ", Port$
Print
a5 = CreateIC(driver$, print_device$, Port$, 0)
a6 = GetDeviceCaps(a5, 0)
Print "Driver Version : "; Hex$(a6)
a7 = GetDeviceCaps(a5, TECHNOLOGY)
If a7 And DT_RASPRINTER Then
Print "Technology: ", "DT_RASPRINTER Raster Printer"
End If
Print
Print "CLIPCAPS (Clipping Capabilities)"
Print
a8 = GetDeviceCaps(a5, CLIPCAPS)
If a8 And CP_RECTANGLE Then
Print Space$(5) & "CP_RECTANGLE", "Can Clip To Rectangle:", "Yes"
Else
Print Space$(5) & "CP_RECTANGLE", "Can Clip To Rectangle:", "No"
End If
Print
Print "RASTERCAPS (Raster Capabilities)"
Print
a9 = GetDeviceCaps(a5, RASTERCAPS)
If a9 And RC_BITBLT Then
Print Space$(5) & "RC_BITBLT", "Capable of simple BitBlt:", "Yes"
Else
Print Space$(5) & "RC_BITBLT", "Capable of simple BitBlt:", "No"
End If
If a9 And RC_BANDING Then
Print Space$(5) & "RC_BANDING", "Requires banding support:", "Yes"
Else
Print Space$(5) & "RC_BANDING", "Requires banding support:", "No"
End If
If a9 And RC_SCALING Then
Print Space$(5) & "RC_SCALING", "Requires scaling support:", "Yes"
Else
Print Space$(5) & "RC_SCALING", "Requires scaling support:", "No"
End If
If a9 And RC_BITMAP64 Then
Print Space$(5) & "RC_BITMAP64", "Supports bitmaps >64:", "Yes"
Else
Print Space$(5) & "RC_BITMAP64", "Supports bitmaps >64:", "No"
End If
If a9 And RC_GDI20_OUTPUT Then
Print Space$(5) & "RC_GDI20_OUTPUT", "Has 2.0 output calls:", "Yes"
Else
Print Space$(5) & "RC_GDI20_OUTPUT", "Has 2.0 output calls:", "No"
End If
If a9 And RC_DI_BITMAP Then
Print Space$(5) & "RC_DI_BITMAP", "Supports DIB to Memory:", "Yes"
Else
Print Space$(5) & "RC_DI_BITMAP", "Supports DIB to Memory:", "No"
End If
If a9 And RC_PALETTE Then
Print Space$(5) & "RC_PALETTE", "Supports a palette:", "Yes"
Else
Print Space$(5) & "RC_PALETTE", "Supports a palette:", "No"
End If
If a9 And RC_DIBTODEV Then
' Enter the following two lines as one, single line of code:
Print Space$(5) & "RC_DIBTODEV", "Supports bitmap conversion:", "Yes"
Else
' Enter the following two lines as one, single line of code:
Print Space$(5) & "RC_DIBTODEV", "Supports bitmap conversion:", "No"
End If
If a9 And RC_BIGFONT Then
Print Space$(5) & "RC_BIGFONT", "Supports fonts >64K:", "Yes"
Else
Print Space$(5) & "RC_BIGFONT", "Supports fonts >64K:", "No"
End If
If a9 And RC_STRETCHBLT Then
Print Space$(5) & "RC_STRETCHBLT", "Supports StretchBlt:", "Yes"
Else
Print Space$(5) & "RC_STRETCHBLT", "Supports StretchBlt:", "No"
End If
If a9 And RC_FLOODFILL Then
Print Space$(5) & "RC_FLOODFILL", "Supports FloodFill:", "Yes"
Else
Print Space$(5) & "RC_FLOODFILL", "Supports FloodFill:", "No"
End If
If a9 And RC_STRETCHDIB Then
Print Space$(5) & "RC_STRETCHDIB", "Supports StretchDIBits:", "Yes"
Else
Print Space$(5) & "RC_STRETCHDIB", "Supports StretchDIBits:", "No"
End If
finished = DeleteDC(a5)
End Sub |