Autor Tema: ucImage.LoadImageFromRes ???  (Leído 2209 veces)

0 Usuarios y 1 Visitante están viendo este tema.

bebekbdg

  • Bytes
  • *
  • Mensajes: 15
  • Reputación: +0/-0
    • Ver Perfil
ucImage.LoadImageFromRes ???
« 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

cobein

  • Moderador Global
  • Gigabyte
  • *****
  • Mensajes: 348
  • Reputación: +63/-0
  • Más Argentino que el morcipan
    • Ver Perfil
Re:ucImage.LoadImageFromRes ???
« Respuesta #1 en: Mayo 07, 2013, 06:02:47 pm »
Found a bug in LoadImageFromRes

Código: [Seleccionar]
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