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:
Private Sub Form_Load() Dim LinkResults As String Dim i As Integer Dim NameResults As String Dim x As Integer VidStatus.Enabled = True VidStatus.Visible = True VidStatus.Caption = "CHOOSE A VIDEO" LinkResults = Inet1.OpenURL("http://www.xxxxxxxxxxxxxxxxxxx.com/info.php?do=getlinks") For i = 0 To 1 VidLinks.AddItem (Split(LinkResults, "|")(i)), i Next NameResults = Inet1.OpenURL("http://www.xxxxxxxxxxxxxxxxxxx.com/info.php?do=getnames") For x = 0 To 1 VidNames.AddItem (Split(NameResults, "|")(x)), x Next End Sub Private Sub VidNames_Click() VidStatus.Enabled = False VidStatus.Visible = False Dim lindex As Integer lindex = VidNames.ListIndex Player.URL = VidLinks.List(lindex) End Sub
And heres the PHP:
And heres a screenshot of the text centered: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."|";
}
}
This is my first project with VB, any help would be greatly appreciated.





Reply With Quote