Autor Tema: ListBoxEx - Load icon from resouce ...  (Leído 3041 veces)

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

cliv

  • Kilobyte
  • **
  • Mensajes: 69
  • Reputación: +1/-2
    • Ver Perfil
ListBoxEx - Load icon from resouce ...
« en: Julio 02, 2010, 02:28:53 am »
I want to load icon from resource.....I try:

    With ListBoxEx1
        .IconsSize = 48
        For i = 0 To 2
            .ImageListLoadIconFromResource "LISTICON"
        Next
        .AddItems "UNU", 1
        .AddItems "DOI", 2
        .AddItems "TREI", 3
        .IconAlign = AlingLeft
        .SelectedIndex = 1
    End With


Resource file have 3 icon in "LISTICON" section....
....But not work...
What i Do Wrong....

Can you post a sample loading icon from resource...?

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:ListBoxEx - Load icon from resouce ...
« Respuesta #1 en: Julio 02, 2010, 06:50:33 am »
only reads from the section "ICON", you must pass as a parameter the name of the resource, Example  101 102 or Icon_0, Icon_1

        For i = 0 To 2
            .ImageListLoadIconFromResource "10" & i
        Next

or

        For i = 0 To 2
            .ImageListLoadIconFromResource "Icon_" & i
        Next


and they only show when the application is compiled, that's a mistake that should have done differently.

cliv

  • Kilobyte
  • **
  • Mensajes: 69
  • Reputación: +1/-2
    • Ver Perfil
Re:ListBoxEx - Load icon from resouce ...
« Respuesta #2 en: Julio 02, 2010, 08:09:05 am »
....Please look at this.....What is wrong...?
http://rapidshare.com/files/404470910/Temp.zip.html

...Can image be load other then resource or file....?

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:ListBoxEx - Load icon from resouce ...
« Respuesta #3 en: Julio 03, 2010, 08:01:52 am »
hi, the resource file appears to be an error, we recommend to use XN Resource Editor or Resource Builder

working example here
http://rapidshare.com/files/404671347/Temp.zip.html

Saludos.

cliv

  • Kilobyte
  • **
  • Mensajes: 69
  • Reputación: +1/-2
    • Ver Perfil
Re:ListBoxEx - Load icon from resouce ...
« Respuesta #4 en: Julio 03, 2010, 08:14:08 am »
hi, the resource file appears to be an error, we recommend to use XN Resource Editor or Resource Builder

working example here
http://rapidshare.com/files/404671347/Temp.zip.html

Saludos.


THANK YOU...


Resource was made using VB Resource Editor...
« última modificación: Julio 03, 2010, 08:18:33 am por cliv »