| |

VerySource

 Forgot password?
 Register
Search
Author: zhaowei

Ask: Is there a function extension control of VB Picture Box

[Copy link]

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-10-13 20:30:01
| Show all posts
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.
Reply

Use magic Report

1

Threads

8

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2020-10-13 20:45:01
| Show all posts
Thanks, learn.
Reply

Use magic Report

1

Threads

8

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2020-10-13 21:00:01
| Show all posts
午夜修罗:
    To use gdi+ in vb6, such as using gdi+ in a new project 1-Form1, you need to do those installation or setting work.
Reply

Use magic Report

1

Threads

21

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 Great Britain

Post time: 2020-10-13 21:15:02
| Show all posts
No need for special things
There are tutorials on gdi drawing on the Internet, just take a look
Reply

Use magic Report

1

Threads

8

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2020-10-13 21:30:02
| Show all posts
Please provide the URL of "Gdi Drawing Tutorial on the Internet", thank you.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list