Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Start of Code
- Public Class Form1
- Dim wc As New Net.WebClient
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Try
- wc.DownloadString("http://www.minecraft-skin-viewer.net/3d.php?layers=true&aa=true&a=0&w=0&wt=0&abg=0&abd=0&ajg=0&ajd=0&ratio=15&format=png&login=" & TextBox1.Text & "&headOnly=false&displayHairs=true&randomness=970")
- wc.DownloadString("http://s3.amazonaws.com/MinecraftSkins/" & TextBox1.Text & ".png")
- PictureBox1.ImageLocation = "http://www.minecraft-skin-viewer.net/3d.php?layers=true&aa=true&a=0&w=0&wt=0&abg=0&abd=0&ajg=0&ajd=0&ratio=15&format=png&login=" & TextBox1.Text & "&headOnly=false&displayHairs=true&randomness=970"
- PictureBox2.ImageLocation = "http://s3.amazonaws.com/MinecraftSkins/" & TextBox1.Text & ".png"
- Catch ex As Exception
- If ex.Message = "The remote server returned an error: (403) Forbidden." Then
- PictureBox2.ImageLocation = "http://skins.minecraft.net/MinecraftSkins/" & TextBox1.Text & ".png"
- PictureBox1.ImageLocation = "http://www.minecraft-skin-viewer.net/3d.php?layers=true&aa=true&a=0&w=0&wt=0&abg=0&abd=0&ajg=0&ajd=0&ratio=15&format=png&login=" & TextBox1.Text & "&headOnly=false&displayHairs=true&randomness=970"
- End If
- End Try
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim sfd As New SaveFileDialog
- sfd.Filter = "Png Files | *.png"
- sfd.FileName = TextBox1.Text & ".png"
- sfd.Title = "Choose your location"
- Dim result As DialogResult = sfd.ShowDialog()
- If result = Windows.Forms.DialogResult.OK Then
- PictureBox2.Image.Save(sfd.FileName)
- MessageBox.Show("Saved File!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Information)
- Else
- End If
- End Sub
- End Class
- 'End of Code
- 'The GUI looks like this: http://prntscr.com/7baj12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement