Results 1 to 2 of 2

Thread: VB.net ListView Items Issue

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2017
    Posts
    6

    VB.net ListView Items Issue

    Hello, i have creating a Loader with a ListView who load the Items via Database and Add this items .

    This Loader download infos from Cheat list

    Code:
        Public Sub LoadUpHacks()
            Dim wc As New Net.WebClient()
            Form2.GameList.Items.Clear()
            Dim hackListStr = wc.DownloadString("https://site.de/HackList.php?method=list_hacks")
            Dim str As String = hackListStr
            For Each substr As String In str.Split("</br>")
                Dim str1 As String = ""
                str1 = substr
                substr = str1.Replace("/br>", "")
                AddItem(substr.Split("|")(0), substr.Split("|")(1), substr.Split("|")(2), substr.Split("|")(3), substr.Split("|")(4))
            Next
        End Sub
    Code:
    Public Sub AddItem(ByVal name As String, ByVal game As String, ByVal coder As String, ByVal lastupdated As String, ByVal status As String)
            Dim str(4) As String
            Dim itm As ListViewItem
    
    
            str(0) = game
            str(1) = name
            str(2) = coder
            str(3) = lastupdated
            str(4) = status
            If str(4) = "1" Then
                str(4) = "Patched"
            Else
                str(4) = "Working"
            End If
            itm = New ListViewItem(str)
    
            Form2.GameList.Items.Add(itm)
        End Sub


    Code:
     Public Function GetCheats()
            Dim str(5) As String
            Dim itm As ListViewItem
    
            str(0) = GetCheatGame()
            str(1) = GetCheatName()
            str(2) = GetCheatCoder()
            str(3) = GetLastUpdated()
            str(4) = GetStatus()
            itm = New ListViewItem(str)
            Form2.GameList.Items.Add(itm)
        End Function
        Public Sub getStatus1(ByVal hackName As String)
            Try
                Dim i As Integer
                Dim item As ListViewItem
                For i = 0 To Form2.GameList.SelectedItems.Count - 1
                    item = Form2.GameList.SelectedItems(i)
                    hackName = item.SubItems(4).Text
                Next
                If hackName.Contains("Patched") Then
                    Form2.GameList.SelectedItems(i).BackColor = Color.Red
    
                    MsgBox("Not working")
                    Form2.loadb.Enabled = False
                Else
                    Form2.loadb.Enabled = True
                    MsgBox("working")
                End If
            Catch ex As Exception
    
            End Try
        End Sub
    No my Problem is :

    str(4) ... This is not working i need when GameList subitem (4) is Patched then this Line is Red or Text and when Select the item Come Error or Button is Hide .

    How can make this on Selected Item?
    Dont make Discusion over Cheats here ! I have Ask Question to VB.net ! Cheats not illegal ... have no no Problem with this and can you help me with VB.net then make Replay

  2. #2
    Hyperactive Member
    Join Date
    Aug 2017
    Location
    Nigeria
    Posts
    257

    Re: VB.net ListView Items Issue

    1. Let me say organize your code properly
    2. don't post bunch of unnecessary codes out here. post where you are confused or need help
    All the arrays you are creating exists only when the procedure is called. They dont retain values to be used by other procedures
    Last edited by TATARPRO; Sep 25th, 2017 at 09:15 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