Visual Basic Foro

Programación => Visual Basic 6 => Mensaje iniciado por: cliv en Julio 02, 2010, 02:28:53 am

Título: ListBoxEx - Load icon from resouce ...
Publicado por: cliv 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...?
Título: Re:ListBoxEx - Load icon from resouce ...
Publicado por: LeandroA 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.
Título: Re:ListBoxEx - Load icon from resouce ...
Publicado por: cliv en Julio 02, 2010, 08:09:05 am
....Please look at this.....What is wrong...?
http://rapidshare.com/files/404470910/Temp.zip.html (http://rapidshare.com/files/404470910/Temp.zip.html)

...Can image be load other then resource or file....?
Título: Re:ListBoxEx - Load icon from resouce ...
Publicado por: LeandroA 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.
Título: Re:ListBoxEx - Load icon from resouce ...
Publicado por: cliv 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...