[C#] Creating a "GamerTag Viewer." (SIMPLE tutorial.)

Discussion in 'Programming & Scripting' started by DrXthirst, Feb 4, 2010 with 7 replies and 1,394 views.

  1. DrXthirst

    DrXthirst Join Date: March 2006

    Messages:
    1,122
    Ratings:
    326
    Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    Well, so many people want to create them that I figured I may as well go ahead and release my code. The code I have seen so far has been so complicated and way more has been needed than before.

    (I put this in a quote because the code tag stretched the forum size.)
    Basically, that loads an image into the picturebox from the internet. Just copy and paste that code, renaming "pictureBox1" to the name of your picturebox, then you replace the code in "download data" to the link of whatever you want the picturebox to show.

    For example, mine reads "http://card.mygamercard.net/" (The URL for gamercards) PLUS whatever text is in the gamertag textbox PLUS ".png" (the file extension.)


    I hope this helps a few people.
     
  2. SotG Caboose

    SotG Caboose Getting There

    Messages:
    1,444
    Ratings:
    681
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    Image.FromURL("url"); < I dont know if that is the correct function name, but Image does have a function for this. A lot easier than using your code.
     
  3. OP
    DrXthirst

    DrXthirst Join Date: March 2006

    Messages:
    1,122
    Ratings:
    326
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    You're correct, but sometimes, that code does not work for some reason.
     
  4. Thilo

    Thilo Contributor

    Messages:
    2,786
    Ratings:
    1,200
  5. ttrever

    ttrever Contributor

    Messages:
    2,180
    Ratings:
    653
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    PictureBox1.ImageLocation = "http://avatar.xboxlive.com/avatar/" + TextBox1.Text + "/avatar-body.png"


    I think this is the easiest.
     
    • Like Like x 1
  6. Thilo

    Thilo Contributor

    Messages:
    2,786
    Ratings:
    1,200
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    To avoid even more errors, do:


     
  7. OP
    DrXthirst

    DrXthirst Join Date: March 2006

    Messages:
    1,122
    Ratings:
    326
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    Everytime I try "imagelocation" with a URL, it gives me a "URI not found" problem. Yes, "URI," NOT "URL."

    Why?
     
  8. A Roadkill Baby

    A Roadkill Baby Enthusiast

    Messages:
    218
    Ratings:
    30
    Re: Creating a "GamerTag Viewer." (SIMPLE tutorial.)

    sounds like you don't have the prefix of like "http://www." on the URI (yes, URI...)
     

Share This Page