Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2-TEXTBOX
- 1-BUUOTN
- 1-label
- واداةasixmpp.dll
- ندخل علي قائمة الاكواد بواسطة المواس نضغط مرتين علي الفروم
- راح نضع في جنرال الاكواد التاليه
- Imports agsXMPP
- Imports System.IO
- Imports agsXMPP.Xml.Dom
- Imports agsXMPP.protocol.client
- Imports System.Text
- Imports VB = Microsoft.VisualBasic
- Imports Microsoft.Win32
- ونضع الاكواد التاليه تحت Public Class Form1
- Dim nimbuzz As New agsXMPP.XmppClientConnection
- Dim gt, j As String, server1 As String = "nimbuzz.com", host1 As String = "o.nimbuzz.com"
- Dim target As String
- نضع الاكواد التاليه في زر تسجيل الدخول كما موضح بالصوره
- Private Sub Button1_Click(ByVal sender As System.Object, ByVale As System.EventArgs) Handles Button1.Click
- 'هنا كود الاتصال
- If Button1.Enabled = True Then
- With nimbuzz
- .Server = server1
- .ConnectServer = host1
- 'هنا هنحدد التسكت الي هتكتب فيه اسم النك وتكست الباسورد
- .Open(TextBox1.Text, TextBox2.Text, "Nimbuzz_MIDP5246")
- AddHandler nimbuzz.OnLogin, AddressOf loged1
- AddHandler nimbuzz.OnAuthError, AddressOf wrong1
- End With
- Button1.Text = " ... انتظر جاري الاتصال"
- End If
- End Sub
- نضع الاكواد التاليه خلف اكواد الزر بالترتيب كما نشاهد في الصوره
- Private Sub loged1(ByVal sender As Object)
- If MyBase.InvokeRequired = True Then
- MyBase.BeginInvoke(New agsXMPP.ObjectHandler(AddressOf loged1), New Object() {sender})
- Else
- 'هنا ف حالة نجح في التسجيل راح نكتب اوامر مثلا اانا راح اعطي امر يخبرني ان الحساب اون لاين
- Label4.Text = "نجح في تسجيل الدخول"
- End If
- End Sub
- Private Sub wrong1(ByVal sender As Object, ByVal e As agsXMPP.Xml.Dom.Element)
- If MyBase.InvokeRequired = True Then
- MyBase.BeginInvoke(New agsXMPP.XmppElementHandler(AddressOf wrong1), New Object() {sender, e})
- Else
- 'وهنا فشل في تسجيل الددخول ارح اعطي امر مسج بوكس يخبرني بان الايميل مش شغال
- MsgBox("خطاء في اسم المستخدم او كلمة المرور رجاء التاكد من البيانات")
- End If
- End Sub
Add Comment
Please, Sign In to add comment