|
gdi+ is very good, it is used in vb6
Public Declare Function GdiplusStartup Lib "gdiplus.dll" _
(token As Long, inputbuf As GdiplusStartupInput, Optional ByVal outputbuf As Long = 0) As GpStatus
Public Declare Sub GdiplusShutdown Lib "gdiplus.dll" _
(ByVal token As Long)
'----------------GDI+-------------------
Public GpInput As GdiplusStartupInput
Public token As Long 'Needed to close GDI+
'NOTE: Enums evaluate to a Long
Public Enum GpStatus' aka Status
Ok = 0
GenericError = 1
InvalidParameter = 2
OutOfMemory = 3
ObjectBusy = 4
InsufficientBuffer = 5
NotImplemented = 6
Win32Error = 7
WrongState = 8
Aborted = 9
FileNotFound = 10
ValueOverflow = 11
AccessDenied = 12
UnknownImageFormat = 13
FontFamilyNotFound = 14
FontStyleNotFound = 15
NotTrueTypeFont = 16
UnsupportedGdiplusVersion = 17
GdiplusNotInitialized = 18
PropertyNotFound = 19
PropertyNotSupported = 20
End Enum
Private Sub Form_Load()
'gdi+initialization
GpInput.GdiplusVersion = 1
If GdiplusStartup(token, GpInput) <> Ok Then
MsgBox "Error initializing GDI+!"&Chr(13)&"Gdiplus.dll is malfunctioning!", vbCritical, "Program startup failed"
Unload Me
Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call GdipClose
End Sub
Public Sub GdipClose()
Call GdiplusShutdown(token)
End Sub
gdiplus.dll can be found in the QQ folder, and there is a special gdi+ vb module file for processing graphics and pictures on the Internet. |
|