Results 1 to 8 of 8

Thread: [RESOLVED] Strange Listbox Problem

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Location
    Topsail Beach, NC
    Posts
    5

    Resolved [RESOLVED] Strange Listbox Problem

    For some reason the listbox in my application is centering the text.

    My host does not allow remote database connections, so the application is linked to a PHP file that connects to the database and runs a query, then returns the data back to the application and dynamically populates the listbox at runtime.

    Everything works exactly like I want it to, I just dont want the stuff centered in the listbox.

    Heres the VB code:

    VB Code:
    1. Private Sub Form_Load()
    2.  Dim LinkResults As String
    3.  Dim i As Integer
    4.  Dim NameResults As String
    5.  Dim x As Integer
    6.  VidStatus.Enabled = True
    7.  VidStatus.Visible = True
    8.  VidStatus.Caption = "CHOOSE A VIDEO"
    9. LinkResults = Inet1.OpenURL("http://www.xxxxxxxxxxxxxxxxxxx.com/info.php?do=getlinks")
    10.  For i = 0 To 1
    11.   VidLinks.AddItem (Split(LinkResults, "|")(i)), i
    12.  Next
    13. NameResults = Inet1.OpenURL("http://www.xxxxxxxxxxxxxxxxxxx.com/info.php?do=getnames")
    14.  For x = 0 To 1
    15.   VidNames.AddItem (Split(NameResults, "|")(x)), x
    16.  Next
    17.  
    18.   End Sub
    19.  
    20. Private Sub VidNames_Click()
    21. VidStatus.Enabled = False
    22. VidStatus.Visible = False
    23. Dim lindex As Integer
    24. lindex = VidNames.ListIndex
    25. Player.URL = VidLinks.List(lindex)
    26. End Sub

    And heres the PHP:

    PHP Code:
    include('dbConn.php');
     
    $sql=mysql_query("SELECT * FROM videos");
        while(
    $row=mysql_fetch_array($sql)) {
        
    $vid=$row["ID"];
        
    $vlink=$row["LINK"];
        
    $vname=$row["VIDNAME"];
        
    $shooter=$row["Shooter"];
        
        if(
    $_GET['do'] == "getlinks") {
        echo 
    $vlink."|";
          }
         if(
    $_GET['do'] == "getnames") {
        echo 
    $vname."|";
         }
        } 
    And heres a screenshot of the text centered:



    This is my first project with VB, any help would be greatly appreciated.
    Last edited by DA2Ricky; Jul 10th, 2006 at 10:24 AM.

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