Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub getClanLogo()
- Try
- Dim httpContent = New System.Net.WebClient().DownloadString("http://www.wa-sta.net/clan/profile/" & API.apireader.data.clan.id)
- Dim MUSTER As New Regex("<div[^<>]*class=""service-wrapper""[^<>]*>(?<content>.*?)</div>") ' MUSTER FÜR ALLE <DIV> .. </DIV>-BLÖCKE")
- Dim DIVTREFFER As MatchCollection = MUSTER.Matches(httpContent) ' <DIV> .. </DIV>-BLÖCKE FINDEN
- For Each TREFFER1 As Match In DIVTREFFER ' DIE TREFFERLISTE DURCHLAUFEN UND ...
- clanlogo = TREFFER1.ToString ' ... TREFFER EINZELN AUSGEBEN
- clanlogo = clanlogo.Substring(96)
- st = clanlogo.Split(Chr(34))
- clanlogo = st(0)
- st2 = clanlogo.Split(CChar(","))
- clanlogo = st2(1)
- Dim ms As New System.IO.MemoryStream(Convert.FromBase64String(clanlogo))
- Dim bmp As New Bitmap(ms)
- PictureBox2.Image = bmp
- Dim sTooltip1 As SuperToolTip = New SuperToolTip
- Dim item1 As ToolTipItem = New ToolTipItem
- Dim item2 As ToolTipTitleItem = New ToolTipTitleItem
- item1.Image = ResizeImage(bmp, 0.5, 0.5, InterpolationMode.High)
- item2.Text = API.apireader.data.clan.name
- sTooltip1.Items.Add(item1)
- sTooltip1.Items.Add(item2)
- BarStaticItem2.SuperTip = sTooltip1
- haslogo = True
- Exit For
- Next
- Catch ex As Exception
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement