Nuevo Foro de programacion
0 Usuarios y 1 Visitante están viendo este tema.
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_PaintLoadImageFromCustomRes_Error:End Function