elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  imagelist Questions
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: imagelist Questions  (Leído 3,504 veces)
ntaryl

Desconectado Desconectado

Mensajes: 95



Ver Perfil
imagelist Questions
« en: 4 Enero 2011, 22:11 pm »

Good  evening   
I use a picture to load a gif from a dll .
When  add a picture in Imagelist use <<Call Form1.img.ListImages.Add(, , Form1.Flag.Picture)>>
want to Load severals gifs in the Imagelist
How can call the Items  from the Imagelist in ListView ?
thanks for the time  .
No want to add All together  .....

Ps This  project use GetLocaleInfo  to find what Country u are from and add the flag(gif)in the ListView.

 


En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: imagelist Questions
« Respuesta #1 en: 4 Enero 2011, 22:52 pm »

.
WHAT WE WANT IS PUT IMAGES in a ListView?


Relacionar ImageList

Código
  1.  
  2.    ListView.Icons = ListIcon         'Relaciona una coleccion de images Normales      (Optional)
  3.    ListView.SmallIcons = ListIcon 'Relaciona una coleccion de imagenes pequeñas (Optional)
  4.  
  5.  

Relacionar Iconos con los Items

Código
  1.  
  2.        ListView.ListItems.Add , , "Hola Mundo", IndexIconNormal, IndexICOnPequeño
  3.        ListView.ListItems.Item(IndexITem).Icon = IndexIconNormal
  4.        ListView.ListItems.Item(IndexITem).SmallIcon = IndexIconoPequeño
  5.  
  6.  

Nota: Las imagenes Gif No son animadas en los Items ya que en el imagelist las convierte a Iconos al cargar en el mismo.

(translate.google.com.mx)
Note: Gif images are not animated in the Items because in the imagelist icons convert them to upload it.

Temibles Lunas!¡.


En línea

The Dark Shadow is my passion.
ntaryl

Desconectado Desconectado

Mensajes: 95



Ver Perfil
Re: imagelist Questions
« Respuesta #2 en: 4 Enero 2011, 23:37 pm »

Thanks for the Reply my Friend
I know the gif  not animated  .
i will check it  tomorow 
I load the Gif from dll in the imagelist and want to use it from there
if u have time  givea look




http://www.mediafire.com/?8nf5c24ypk5ih09
En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: imagelist Questions
« Respuesta #3 en: 5 Enero 2011, 01:57 am »

.
I' Not Clear You SourceCode only Relate the imagelist with ListView

Código
  1.  
  2. Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
  3.  
  4. Private Const LOCALE_SYSTEM_DEFAULT As Long = &H400
  5. Private Const LOCALE_SENGCOUNTRY = &H1002
  6.  
  7. Private objCnSRes           As Object
  8.  
  9. Private Sub Command1_Click()
  10.    With Lv.ListItems.Add(, , "aaa", GetFlag(GetCountry), GetFlag(GetCountry))
  11.        .SubItems(1) = "0.0.0.0"
  12.        .SubItems(2) = "1111"
  13.    End With
  14. End Sub
  15.  
  16. Private Sub Form_Load()
  17. Dim lvitem              As ListItem
  18.  
  19.    With Lv
  20.  
  21.        '   Initialize ImageList
  22.        Set objCnSRes = CreateObject("Flags.cRec")
  23.        '   //  In the DLL Declare CountImages  ( Cant of Images ),
  24.        For lng_i = 1 To objCnSRes.CountImages
  25.            '  // is added 100 for the id of the image resources
  26.            Call img.ListImages.Add(, , objCnSRes.GetPicture(lng_i+100, GIF))
  27.        Next lng_i
  28.        Set objCnSRes = Nothing
  29.  
  30.  
  31.        .Icons = img    'Relate ImageList With The ListView.
  32.        .View = lvwReport
  33.        Call .ColumnHeaders.Add(, , ".#.", 2000, vbLeftJustify)
  34.        Call .ColumnHeaders.Add(, , "Proxy IP ", 2000, vbLeftJustify)
  35.        Call .ColumnHeaders.Add(, , "Port", 1300, vbLeftJustify)
  36.  
  37.    End With
  38. End Sub
  39.  
  40. Public Function GetCountry() As String
  41. Dim sName As String * 256, lBuffSize As Long
  42.    lBuffSize = GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGCOUNTRY, ByVal sName, Len(sName))
  43.    GetCountry = Left(sName, lBuffSize - 1)
  44. End Function
  45.  
  46. Public Function GetFlag(sCountry As String) As Long
  47.    Select Case LCase(sCountry)
  48.        Case "greece"
  49.            GetFlag = 1
  50.        Case "argentina"
  51.            GetFlag = 2
  52.        Case "mexico"   '   //  This my State
  53.            GetFlag = 1
  54.        'Case Else
  55.            'GetFlag = 0 '   //  Case Defaul Image
  56.    End Select
  57. End Function
  58.  
  59.  

Dulce Infierno Lunar!¡.
.
« Última modificación: 5 Enero 2011, 02:09 am por BlackZeroX▓▓▒▒░░ » En línea

The Dark Shadow is my passion.
ntaryl

Desconectado Desconectado

Mensajes: 95



Ver Perfil
Re: imagelist Questions
« Respuesta #4 en: 5 Enero 2011, 21:49 pm »

Thanks  man   i will check it  now 
En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: imagelist Questions
« Respuesta #5 en: 5 Enero 2011, 21:58 pm »

.
 :silbar: :silbar:

Sin Dependencias de OCX...

http://foro.elhacker.net/programacion_visual_basic/srcuc_listviewex_20_reprogramado_05012011_no_skiner-t315820.0.html

 :silbar: :silbar:


Dulces Lunas!¡.
En línea

The Dark Shadow is my passion.
ntaryl

Desconectado Desconectado

Mensajes: 95



Ver Perfil
Re: imagelist Questions
« Respuesta #6 en: 6 Enero 2011, 00:00 am »

I  cant  fix it to work with the
Código:
GetFlag(GetCountry)
Thanks  for the time 
En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: imagelist Questions
« Respuesta #7 en: 6 Enero 2011, 00:26 am »


Código
  1.  
  2. GetFlag(GetCountry)
  3.  
  4.  

Esta funcion retorna el indice de la imagen en el ImageList.

http://translate.google.com.mx/
This function returns the index of the image in the ImageList.

Dulces Lunas!¡.
En línea

The Dark Shadow is my passion.
ntaryl

Desconectado Desconectado

Mensajes: 95



Ver Perfil
Re: imagelist Questions
« Respuesta #8 en: 6 Enero 2011, 22:50 pm »

My stupid mistake
i use (Greece)
and the correct is greece
havea good  night  bro 
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
ListView & ImageList.-
Programación Visual Basic
mdg 4 2,231 Último mensaje 25 Enero 2007, 17:48 pm
por ~~
Problema con IMAGELIST
Programación Visual Basic
dsr 2 1,471 Último mensaje 13 Septiembre 2008, 22:21 pm
por seba123neo
ImageList ayuda plz
Programación Visual Basic
visualfree 1 1,295 Último mensaje 19 Diciembre 2008, 20:09 pm
por visualfree
F.A.Q. - Frequently Asked Questions
.NET (C#, VB.NET, ASP)
Mace Windu 0 2,662 Último mensaje 11 Enero 2009, 22:28 pm
por Mace Windu
Imagelist and Listview
Programación Visual Basic
ntaryl 4 4,712 Último mensaje 24 Noviembre 2009, 22:31 pm
por ntaryl
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines