Advertisement
Guest User

Testing

a guest
May 30th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.04 KB | None | 0 0
  1. 'Start of Code
  2. Public Class Form1
  3.  
  4.     Dim wc As New Net.WebClient
  5.  
  6.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  7.         Try
  8.             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")
  9.             wc.DownloadString("http://s3.amazonaws.com/MinecraftSkins/" & TextBox1.Text & ".png")
  10.             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"
  11.             PictureBox2.ImageLocation = "http://s3.amazonaws.com/MinecraftSkins/" & TextBox1.Text & ".png"
  12.         Catch ex As Exception
  13.             If ex.Message = "The remote server returned an error: (403) Forbidden." Then
  14.                 PictureBox2.ImageLocation = "http://skins.minecraft.net/MinecraftSkins/" & TextBox1.Text & ".png"
  15.                 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"
  16.             End If
  17.  
  18.         End Try
  19.  
  20.     End Sub
  21.  
  22.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  23.  
  24.         Dim sfd As New SaveFileDialog
  25.         sfd.Filter = "Png Files | *.png"
  26.         sfd.FileName = TextBox1.Text & ".png"
  27.         sfd.Title = "Choose your location"
  28.         Dim result As DialogResult = sfd.ShowDialog()
  29.  
  30.         If result = Windows.Forms.DialogResult.OK Then
  31.             PictureBox2.Image.Save(sfd.FileName)
  32.             MessageBox.Show("Saved File!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Information)
  33.         Else
  34.  
  35.         End If
  36.  
  37.     End Sub
  38. End Class
  39. 'End of Code
  40.  
  41. 'The GUI looks like this: http://prntscr.com/7baj12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement