Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: bebekbdg en Mayo 07, 2013, 03:21:16 pm
-
is there anyone who can give me an example of calling
ucImage.LoadImageFromRes along with files. Res
Thank you in advance
-
Found a bug in LoadImageFromRes
Public Function LoadImageFromRes( _
ByVal ResIndex As Variant, _
ByVal ResSection As Variant, _
Optional VBglobal As IUnknown) As Boolean
Dim bvData() As Byte
Dim oVBglobal As VB.Global
On Local Error GoTo LoadImageFromCustomRes_Error
If VBglobal Is Nothing Then
Set oVBglobal = VB.Global
ElseIf TypeOf VBglobal Is VB.Global Then
Set oVBglobal = VBglobal
ElseIf VBglobal Is Nothing Then
Set oVBglobal = VB.Global
End If
bvData = oVBglobal.LoadResData(ResIndex, ResSection)
c_bvData() = bvData '<----/////////////////////////////////////////////// This line must be added here
LoadImageFromRes = LoadFromStream(bvData)
Call UserControl.Cls
Call LoadFromStream(bvData)
Call UserControl_Paint
LoadImageFromCustomRes_Error:
End Function
I will tell Leandro so he can update the control. Ill Attach an example anyway
https://dl.dropboxusercontent.com/u/43394978/Code/ucImageList.rar