Results 1 to 4 of 4

Thread: 2 FileListBox questions...[Solved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473

    Unhappy 2 FileListBox questions...[Solved]

    Hi.
    I have 2 questions about the filelistbox control...

    1)Is there a way to hide the extension from the files that are shown in the filelistbox?Maybe use a regular list box control?

    2)I want to change the extension from the selected file on the file list box control.From .dll i want to change it to .disdll and vice versa.I tried something like:
    VB Code:
    1. Name App.Path & "\" & flEnabled.FileName As Left$(flEnabled.FileName, Len(flEnabled.FileName - 4) & ".disdll")
    but that didnt work.
    If I can use a regular list box for the first question then the other question is probably solved...

    Thanks for helping!
    Last edited by mike2; Apr 11th, 2004 at 03:17 PM.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Like this?


    Phreak
    Attached Files Attached Files

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473
    Exacly thanks.
    I tried something like:
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim i As Integer
    3. For i = 0 To File1.ListCount - 1
    4. File1.ListIndex = i
    5. List1.AddItem File1.FileName
    6. Next i
    7.  
    8. For i = 0 To List1.ListCount - 1
    9. List1.ListIndex = i
    10. List1.Text = Replace(List1.Text, ".dll", vbNullString)
    11. Next i
    12. End Sub
    but it didnt replace the .dll ...
    Anyway thanks!

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    I really should start using the FileListBox alot more. Its so much easier than doing it with API

    ...and No Problem


    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width