home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Export_tre486021142002.psc / modMain.bas next >
Encoding:
BASIC Source File  |  2002-01-10  |  972 b   |  34 lines

  1. Attribute VB_Name = "modMain"
  2. '------------------------------------------------------------------
  3. ' Name:           modMain (modMain.bas)
  4. ' Type:           Module
  5. ' Description:    -
  6. '
  7. ' Author:         Koen Muilwijk
  8. ' Date:           10-1-2002
  9. ' E-mail:         deye_99@yahoo.com
  10. ' Copyright:      This work is copyrighted ⌐ 2001
  11. '
  12. ' Comments:       -
  13. '------------------------------------------------------------------
  14. Option Explicit
  15.  
  16. 'Load all gif images of a given directory in a ImageCombobox
  17. Public Sub LoadFolderInIml(imlTarget As ImageList, strFolder As String)
  18. Dim strFile As String, strKey As String
  19.   
  20. '  cmbTarget.ImageList = imlTarget
  21.   strFile = Dir(strFolder & "*.gif")
  22.   Do While strFile <> ""
  23.     'Add the image to the image list
  24.     strKey = Left(strFile, Len(strFile) - 4)
  25.     imlTarget.ListImages.Add , strKey, LoadPicture(strFolder & strFile)
  26.     
  27.     'Ask for the next file
  28.     strFile = Dir()
  29.     
  30.   Loop
  31.  
  32. End Sub
  33.  
  34.