THE NEWS PK
Welcome to BlackBuzz-team
If this is your first visit, be sure to check out the Rules by clicking the link above..

You may have to register before you can post.. Login the Registe link above to proceed..

Join the forum, it's quick and easy

THE NEWS PK
Welcome to BlackBuzz-team
If this is your first visit, be sure to check out the Rules by clicking the link above..

You may have to register before you can post.. Login the Registe link above to proceed..
THE NEWS PK
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Keywords

User  Searcher  send  pass  code  password  maker  JAVA  hack  list  nimbuzz  Source  facebook  

Latest topics
» فلود جديد يعمل على جميع انواع نكات لفلود القديمة والجديدة2018
Created Your First Application For Nimbuzz Icon_minitimeFri Oct 20, 2017 7:43 am by koko???

» فلود 2017 ضد حظر الاي بي بشكل كامل NEW FLOOODER ANTI BAN IP
Created Your First Application For Nimbuzz Icon_minitimeSat Jan 28, 2017 10:55 pm by koko???

» New1 Team Room Freezer ( Owner List Hanger )
Created Your First Application For Nimbuzz Icon_minitimeThu Jan 26, 2017 8:52 pm by switchak

» 40,000 Stylish Ids For Cracking
Created Your First Application For Nimbuzz Icon_minitimeMon Jan 23, 2017 9:01 am by kamal99999

» BlackBuzzTEAM Anti Ban Anti Kick Flooder
Created Your First Application For Nimbuzz Icon_minitimeSat Nov 07, 2015 2:27 am by مدثر

» 4STAR TEAM 24/7 ONLINE BOTS
Created Your First Application For Nimbuzz Icon_minitimeTue Oct 20, 2015 1:27 pm by vijay_jesu

» FreeBuzz Ip Changer
Created Your First Application For Nimbuzz Icon_minitimeSat Oct 17, 2015 1:43 pm by anu s nair

» Free Vps Server
Created Your First Application For Nimbuzz Icon_minitimeSat Oct 10, 2015 11:58 am by vijay_jesu

» / ―●MEGATHREAD―●Free VPS,Free VPS Trials & Really Cheap VPS's―●MEGATHREAD―●
Created Your First Application For Nimbuzz Icon_minitimeSat Oct 10, 2015 9:20 am by vijay_jesu

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar

Get Avatar nimbuz

Online Server Bots
BlackBuzz_Bot x2_gfg
Infochanger.bot
.ban..bot.
N!m_Server
*.spy-bot.*
s_2=a
Flage Couter
Flag Counter

You are not connected. Please login or register

Created Your First Application For Nimbuzz

Go down  Message [Page 1 of 1]

djsaim


Administrator
Administrator

Here is a simple tutorial to connect to nimbuzz and send message.

Requirements:
  • Microsoft Visual Basic 2010
  • agsXMPP.dll ( Can be downloaded from here or check the attachments below)


Lets start!!

Firstly open Microsoft Visual C++ 2010 Express and Select New Project
Created Your First Application For Nimbuzz 7UTa
Now you can see window like above picture. Select Windows Form Application and name it MyFirstApp , Then click OK

After the project is created, The next step is to add a reference to agsXMPP.dll which we have downloaded earlier (Take a look at picture below)
Created Your First Application For Nimbuzz 7UYT
Select Browse and open agsXMPP.dll
And your form should look like the following,You can add more fields in form, My form is short because i want to make you understand easily.
Created Your First Application For Nimbuzz 7UZ7

Now Press F7 and select all code and replace it with the code below
Code :-
Code:
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 agsXMPP;
using agsXMPP.protocol.client;

namespace MyFirstApp
{
    public partial class Form1 : Form
    {
        XmppClientConnection gFgCon = new XmppClientConnection();
 
        public Form1()
        {
            InitializeComponent();
            button1.Click += new System.EventHandler(button1_Click);
            button2.Click += new System.EventHandler(button2_Click);
          Load += new System.EventHandler(Form1_Load);
          listBox1.SelectedIndexChanged += new System.EventHandler(listBox1_SelectedIndexChanged);
          button3.Click += new System.EventHandler(button3_Click);

          gFgCon.OnLogin += new ObjectHandler(gFgCon_onlogin);
          gFgCon.OnAuthError += new XmppElementHandler(gFgCon_onAuthEror);
          gFgCon.OnPresence += new agsXMPP.protocol.client.PresenceHandler(connection_onpresence);
          gFgCon.OnMessage += new agsXMPP.protocol.client.MessageHandler(connection_onmsg);
        }

     
        void gFgCon_onAuthEror(object sender, agsXMPP.Xml.Dom.Element e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new XmppElementHandler(gFgCon_onAuthEror), new object[] { sender, e });
                return;
            }

            MessageBox.Show("Wrong username or password", "Error");
            button1.Enabled = true; button2.Enabled = false;
        }
        void gFgCon_onlogin(object sender)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new ObjectHandler(gFgCon_onlogin), new object[] { sender });
                return;
            }
            MessageBox.Show("Login success","Connected");
            button1.Enabled = false;
            button2.Enabled = true;

            gFgCon.Status = "Hi there!";                          //Set Status here
            gFgCon.Show = agsXMPP.protocol.client.ShowType.NONE;  //Set Status type
            gFgCon.SendMyPresence();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == string.Empty || textBox2.Text == string.Empty)
            {
                MessageBox.Show("Invalid username or password", "Error");
            }
            else
            {
                button1.Enabled = false;
                gFgCon.Server = "nimbuzz.com";
                gFgCon.Username = textBox1.Text;
                gFgCon.Password = textBox2.Text;
                gFgCon.Resource = "_gFg"; // You can change resource here
                gFgCon.Priority = 10;
                gFgCon.Port = 5222;
                gFgCon.AutoAgents = false;
                gFgCon.AutoResolveConnectServer = true;
                gFgCon.UseCompression = false;
                gFgCon.Open();
                //--------



            }
        }

        void connection_onpresence(object sender, agsXMPP.protocol.client.Presence pres)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new agsXMPP.protocol.client.PresenceHandler(connection_onpresence), new object[] { sender, pres });
                return;
            }



            if (pres.Type == PresenceType.available)
            {
                listBox1.Items.Add(pres.From.User);
            }
            if (pres.Type == PresenceType.unavailable)
            {
                listBox1.Items.Remove(pres.From.User);
            }


        }
        void connection_onmsg(object sender, agsXMPP.protocol.client.Message msg)
        {
            if (msg.Type == MessageType.error || msg.Body == null)
                return;
            if (InvokeRequired)
            {
                BeginInvoke(new agsXMPP.protocol.client.MessageHandler(connection_onmsg), new object[] { sender, msg });
                return;

            }
           
                richTextBox1.SelectionColor = Color.Red;
                    richTextBox1.AppendText(msg.From.User+ " : ");
                    richTextBox1.AppendText(msg.Body);
                    richTextBox1.AppendText("\r\n");

                    textBox4.Text = msg.From.User;  // id of last messaged user should b stored here
         
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            button1.Enabled = true;
            button2.Enabled = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            gFgCon.Close();
            button1.Enabled = true; button2.Enabled = false;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message
            {
                To = new agsXMPP.Jid(textBox4.Text + "@nimbuzz.com"),
                // for private chat in chatroom :  To = new agsXMPP.Jid("chatroom@conference.nimbuzz.com/id")
                Body = textBox3.Text,
                Subject = "gFg",
                Type = agsXMPP.protocol.client.MessageType.chat
            };
            gFgCon.Send(msg);


            richTextBox1.SelectionColor = Color.Blue;
            richTextBox1.AppendText(textBox1.Text + " : ");
            richTextBox1.AppendText(textBox3.Text);
            richTextBox1.AppendText("\r\n");
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            textBox4.Text = listBox1.SelectedItem.ToString();

        }


    }
}

Now we have all done .Press F5 to start debug the appli. Enjoyyy Wink Very Happy

Feeling lazy? No probs Very Happy Download project file from here Very Happy

Please feel free to ask any question below.

Djsaim@nimbuzz.com

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum