Home of the Ultimate Xbox 360 Modding Tool, Horizon. XboxMB.com is a community of Xbox 360 gamers and modders who share Tutorials, News, Reviews, and other resources. Xbox Message Boards is free to sign up and use, so what are you waiting for? Register Now!
Hey, here is a program I created using C#. It simply gets yours/someone elses gamercard using their XboxMB username, or their gamertag(your choice). There are also 4 different types of gamercard styles. The gamercard's are taken from XboxGamertag.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace Gamercard
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
comboBox1.SelectedIndex = 0;
comboBox2.SelectedIndex = 0;
string gt = GetGamertag("");
if (gt != "")
pictureBox1.ImageLocation = "http://www.xboxgamertag.com/gamercard/" + gt + "/newnxe/card.png";
}
Namespace Gamercard
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
comboBox1.SelectedIndex = 0
comboBox2.SelectedIndex = 0
Dim gt As String = GetGamertag("")
If gt <> "" Then
pictureBox1.ImageLocation = "http://www.xboxgamertag.com/gamercard/" & gt & "/newnxe/card.png"
End If
End Sub
Private Sub button1_Click(sender As Object, e As EventArgs)
Try
If comboBox1.Text = "XboxMB Username" Then
Dim gt As String = GetGamertag(textBox1.Text)
If gt <> "" Then
pictureBox1.ImageLocation = "http://www.xboxgamertag.com/gamercard/" & gt & "/" & comboBox2.Text.ToLower().Replace(" ", "") & "/card.png"
End If
Else
pictureBox1.ImageLocation = "http://www.xboxgamertag.com/gamercard/" + textBox1.Text & "/" & comboBox2.Text.ToLower().Replace(" ", "") & "/card.png"
End If
Catch
pictureBox1.Image = Nothing
MessageBox.Show("An error has occured...Are you connected to the internet?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub
Public Shared Function GetGamertag(UserName As String) As String
Dim xDoc As New XmlDocument()
If UserName <> "" Then
xDoc.Load([String].Format("http://api.xboxmb.com/?u={0}&xml=1", UserName))
Else
xDoc.Load("http://api.xboxmb.com/?xml=1")
End If
For i As Integer = 0 To xDoc.ChildNodes(1).ChildNodes.Count - 1
Dim Current As System.Xml.XmlNode = xDoc.ChildNodes(1).ChildNodes(i)
If Current.Name = "Gamertag" Then
Return Current.InnerText
End If
Next
Return ""
End Function
Private Sub pictureBox1_Click(sender As Object, e As EventArgs)
Dim sfd As New SaveFileDialog()
sfd.Filter = "PNG|*.png|All Files|*.*"
If pictureBox1.Image <> pictureBox1.ErrorImage AndAlso pictureBox1.Image <> pictureBox1.InitialImage AndAlso pictureBox1.Image IsNot Nothing Then
If sfd.ShowDialog() = DialogResult.OK Then
Try
pictureBox1.Image.Save(sfd.FileName)
MessageBox.Show("Image saved successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Catch
MessageBox.Show("An unknown error has occured! Please try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End If
End If
End Sub
End Class
End Namespace
Not sure how accurate it is, but you should be able to fix it.