سفارش تبلیغ
صبا ویژن
.
ایمان خود را با صدقه نگاه دارید ، و مالهاتان را با زکات دادن ، و موجهاى بلا را با دعا برانید . و از سخنان آن حضرت است به کمیل پسر زیاد نخعى [نهج البلاغه]
امروز: دوشنبه 103 اردیبهشت 10



Online backup storage and collaboration

پنج گیگ فضای رایگان+ یک گیگ لیچ رایگان

 متن ماژول:


Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type
Private Type PicBmp
Size As Long
Type As Long
hBmp As Long
hPal As Long
Reserved As Long
End Type


Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long
Private Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (ByVal hInstance As Long, ByVal lpBitmapID As Long) As Long
Private Declare Function Delete Lib "gdi32" (ByVal h As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long


Public Function LoadPicture(sResourceFileName As String, lResourceId As Long) As Picture
Dim hInst As Long
Dim hBmp As Long
Dim Pic As PicBmp
Dim IPic As IPicture
Dim IID_IDispatch As GUID
Dim lRC As Long
hInst = LoadLibrary(sResourceFileName)
If hInst <> 0 Then
hBmp = LoadBitmap(hInst, lResourceId)
If hBmp <> 0 Then
IID_IDispatch.Data1 = &H20400
IID_IDispatch.Data4(0) = &HC0
IID_IDispatch.Data4(7) = &H46
Pic.Size = Len(Pic)
Pic.Type = vbPicTypeBitmap
Pic.hBmp = hBmp
Pic.hPal = 0
lRC = OleCreatePictureIndirect(Pic, _
IID_IDispatch, 1, IPic)
If lRC = 0 Then
Set LoadPicture = IPic
Set IPic = Nothing
Else
Call Delete(hBmp)
End If
End If
Call FreeLibrary(hInst)
hInst = 0
End If
End Function



مثال:




Private Sub Form_Load()
"Try ID 130 in Win98, or 131 in NT
"to see the windows logo...
Set Me.Picture = LoadPicture("shell32.dll", 130)
End Sub 



نوشته شده توسط مهدی در پنج شنبه 88/2/24 و ساعت 10:59 عصر | نظرات دیگران()
لیست کل یادداشت های این وبلاگ
Nod32 SN Finder v1.6
تهیه نسخه بکاپ از دیتابیس نود 32 و بازگردانی
وارد نمودن حروف فارسی بدون تغییر Keylayout
VB Anticrack v1.5 Full
نمایش کامل متن آیتم لیست باکس
محدود نمودن ماوس
باز کردن Regedit در مسیر دلخواه
تغییر استایل کامند به فلات
تغییرات در رجیستری توسط
نحوه استفاده از Gif control
NOD32 SN Finder v1.5
[عناوین آرشیوشده]

بالا

طراح قالب: رضا امین زاده** پارسی بلاگ پیشرفته ترین سیستم مدیریت وبلاگ

بالا