Home > Software engineering >  API LoadImage
API LoadImage

Time:09-19

Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal LPSZ As String, ByVal dwImageType As Long, ByVal dwDesiredWidth As Long, ByVal dwDesiredHeight As Long, ByVal dwFlags As Long) As Long

Private Const LR_LOADFROMFILE=& amp; H10
Private Const IMAGE_BITMAP=0

Dim Tmp_ImageHandle as long
Tmp_ImageHandle=LoadImage (App. The hInstance, vjpgPath IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)

'vjpgPath is JPG image path, I yes, given how return is 0 App. The hInstance=0 return is zero

CodePudding user response:

If you just want to open a JPG file, VB has a built-in function in the
For example
Me. The Picture=LoadPicture (" B: \ 7. JPG ")
Loadpicture, of course, there is a series of parameters, what are the parameter name is easy to understand
  •  Tags:  
  • API
  • Related