Memaparkan catatan dengan label C#. Papar semua catatan
Memaparkan catatan dengan label C#. Papar semua catatan

Ahad, September 01, 2013

.NET : Hardware ID (HWID)

Function HWID()
    Dim hardwareID as String = System.Security.Principal.WindowsIdentity.GetCurrent.User.Value
    return hardwareID
End Function

Selasa, Ogos 06, 2013

C# : Semak .NET

using Microsoft.Win32;
    using System.Globalization;

    private void button1_Click(object sender, EventArgs e)
            {
                RegistryKey installed_versions = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP");
                string[] version_names = installed_versions.GetSubKeyNames();
                double Framework = Convert.ToDouble(version_names[version_names.Length - 1].Remove(0, 1), CultureInfo.InvariantCulture);
                int ServicePack = Convert.ToInt32(installed_versions.OpenSubKey(version_names[version_names.Length - 1]).GetValue("SP", 0));
                MessageBox.Show(".NET " + Framework + "." + ServicePack);
            }

Jumaat, Julai 19, 2013

VB.NET : Contoh cara guna API key dari adf.ly

Dim request As HttpWebRequest = HttpWebRequest.Create("http://api.adf.ly/api.php?key=28532a9e7a2f652aa5809771ee58ceaf&uid=3726590&advert_type=int&domain=adf.ly&url=" & NsTextBox1.Text)
    Dim response As HttpWebResponse = request.GetResponse
    Dim reader As New StreamReader(response.GetResponseStream)
    Dim strings As String = reader.ReadToEnd
    NsTextBox1.Text = strings 

NsTextBox1.Text = New Net.WebClient().DownloadString("http://api.adf.ly/api.php?key=28532a9e7a2f652aa5809771ee58ceaf&uid=3726590&advert_type=int&domain=adf.ly&url=" + NsTextBox1.Text) 

Rabu, Mei 08, 2013

Visual Studio: Batch Auto delete bin, obj etc

start for /d /r . %%d in (bin,obj, ClientBin,Generated_Code) do @if exist "%%d" rd /s /q "%%d"
Nota : Simpan dan nama kan fail dengan ektensi *.bat, letak dalam direktori projek anda. Jalankan fail ini HANYA apabila anda selesai membuat aturcara. Selamat mencuba.Wassalam ~