Results 1 to 7 of 7

Thread: [RESOLVED] 2 questions!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    13

    Resolved [RESOLVED] 2 questions!

    Question#1
    ok i have a problem in my listbox when i pulling the track names of songs in a directory i have hosted on my apache server they have %20 were there is a space shown in the picture and i was woundering is there any way to fix this problem?

    Question #2
    is there a way to be able to move around a form that has no border as shown in the image below?


    thanks in advanced for anyone who can help me or offer their opinions

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: 2 questions!

    For 1, Search the forum (and/or Google) for an URL Decode function.
    For 2, search the forum for "move borderless form"

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    13

    Re: 2 questions!

    Quote Originally Posted by baja_yu View Post
    For 1, Search the forum (and/or Google) for an URL Decode function.
    For 2, search the forum for "move borderless form"
    ok will do thanks

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    13

    Re: 2 questions!

    ok i searched and found this
    vb Code:
    1. Public Function urldecode(sText As String) As String
    2.  
    3. Dim sTemp As String
    4. Dim sAns As String
    5. Dim sChar As String
    6. Dim lctr As Long
    7.  
    8. For lctr = 1 To Len(sText)
    9.  
    10. sChar = Mid$(sText, lctr, 1)
    11.  
    12. If sChar = "+" Then
    13. Mid$(sText, lctr, 1) = " "
    14. ElseIf sChar = "%" Then
    15. the_code1 = Mid$(sText, lctr + 1, 2)
    16. the_code = "&H" & the_code1
    17. convert_to = Chr(Val(the_code))
    18. sText = Replace(sText, "%" & the_code1, convert_to)
    19. End If
    20. Next
    21. urldecode = sText
    22.  
    23. End Function
    but sadly it did not fix my problem for the URL decode its still the same problem as in the picture for question #1

  5. #5
    Addicted Member
    Join Date
    Jul 2010
    Posts
    158

    Re: 2 questions!

    Hi,

    After Populating the list, run this code:
    vb Code:
    1. Dim i As Integer
    2. For i = 0 To List1.ListCount-1
    3. List1.List(i) = Replace(List1.List(i), "%20", " ")
    4. Next

    Regards
    Veena

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    13

    Re: 2 questions!

    Quote Originally Posted by VeenaMG View Post
    Hi,

    After Populating the list, run this code:
    vb Code:
    1. Dim i As Integer
    2. For i = 0 To List1.ListCount-1
    3. List1.List(i) = Replace(List1.List(i), "%20", " ")
    4. Next

    Regards
    Veena
    Thank you it worked great

  7. #7
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: [RESOLVED] 2 questions!

    That will only decode the Space character. There could be other special characters that get coded in an URL that you will need to decode.

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