• Log in or sign up for an account here: https://www.sythe.org/login

Need help from some experienced VB'ers

Status
Not open for further replies.
Joined
Dec 7, 2007
Sythe Gold
0
Messages
1,100
Location
Australia, Qld
I'm trying to make a Highscores look up.. and i have no idea how to

Can anyone help me?

Covey, i know you have experience with this, mind lending a hand?
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim strlines() As String
        Dim strElemnts() As String
        Dim textboxIndex As Integer

        textBoxIndex = 0

strLines = Split(Inet1.OpenURL("http://hiscore.runescape.com/index_lite.ws?player=" & User.Text), Char(10))

        If InStr(strLines(0), "Page not found") Then
            MsgBox("User Not Found!") 'Edit this line if you want to change the error user not found message
            GoTo TheEnd
        End If

        For i = 0 To Ubound(strLines)

	strElements = Split(strLines(i), ","
            If (strElements(x)) = "-1" Then strElements(x) = "NA" 'Edit this line if you want to change the error not in highscores message
            TxtValue(textBoxIndex).Text = strElements(x)
            textBoxIndex = textBoxIndex + 1
        Next x

Next i

That's what i have been given from searching the net, but none of it works..
 
You have VB6 code in a .Net button... Are you using VB6, or .Net?
 
I'm using VB Express 2008 edition.

That code is not mine, i grabbed it from the Internet while Googling the problem.
If you can provide better code or a fix for the provided code, that would be excellent.
 
I can't really provide a simple fix... VB6 and VB.Net are quite different for this kind of this thing. There a no control arrays, making most of this code irrelevant.

Simply put, you're in the wrong section to ask this kind of thing. Check the VB.Net section for actual help.

EDIT: A simple search returned: http://www.sythe.org/showthread.php?t=403877
 
Status
Not open for further replies.
duelarena.gg
Back
Top