Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
hossam2 #1
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to Make like this by agsxmpp
[Image: http://a.top4top.net/p_371448sk1.png]




How to Make like this by agsxmpp
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please look at the agsXMPP.UI project. This builds UI from from xdata forms like in your screenshot.
Avatar
hossam2 #3
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: screenshot  this xdata forms  by jabber.dll
  screenshot  this xdata forms  by jabber.dll



I know it's there in agsXMPP.UI But how to use any of this, such as in the picture

like this   Does not work



  1. If msg.HasTag(GetType(Data)) Then
  2.     Dim e As Element = msg.SelectSingleElement(GetType(Data))
  3.     Dim xdata As Data = TryCast(e, Data)
  4.     If xdata.Type = XDataFormType.form Then
  5.         Dim fXData As New frmXData(xdata)
  6.         fXData.Text = "xData Form from " & msg.From.ToString()
  7.         fXData.Show()
  8.     End If
  9. ElseIf msg.HasTag(GetType(agsXMPP.protocol.extensions.ibb.Data)) Then
  10.     ' ignore IBB messages
  11.     Return
  12. End If
This post was edited 2 times, last on 2017-01-07, 09:32 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please post the xml of your message.
Your code looks good to me.
Avatar
hossam2 #5
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
This code does not work in the show form (xdata forms)
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I asked you to post the complete Xml of your message here (msg object).
Without this Xml we cannot find out why it is not working.
Avatar
hossam2 #7
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
  1. Private Sub XmppCon_OnMessage(sender As Object, msg As agsXMPP.protocol.client.Message)
  2.     If InvokeRequired Then
  3.         ' Windows Forms are not Thread Safe, we need to invoke this :(
  4.         ' We're not in the UI thread, so we need to call BeginInvoke               
  5.         BeginInvoke(New OnMessageDelegate(AddressOf XmppCon_OnMessage), New Object() {sender, msg})
  6.         Return
  7.     End If
  8.  
  9.     ' Dont handle GroupChat Messages here, they have their own callbacks in the
  10.     ' GroupChat Form
  11.     If msg.Type = MessageType.groupchat Then
  12.         Return
  13.     End If
  14.  
  15.     If msg.Type = MessageType.[error] Then
  16.         'Handle errors here
  17.         ' we dont handle them in this example
  18.         Return
  19.     End If
  20.  
  21.     ' check for xData Message
  22.  
  23.     If msg.HasTag(GetType(Data)) Then
  24.         Dim e As Element = msg.SelectSingleElement(GetType(Data))
  25.         Dim xdata As Data = TryCast(e, Data)
  26.         If xdata.Type = XDataFormType.form Then
  27.             Dim fXData As New frmXData(xdata)
  28.             fXData.Text = "xData Form from " & msg.From.ToString()
  29.             fXData.Show()
  30.         End If
  31.     ElseIf msg.HasTag(GetType(agsXMPP.protocol.extensions.ibb.Data)) Then
  32.         ' ignore IBB messages
  33.         Return
  34.     Else
  35.         If msg.Body IsNot Nothing Then
  36.             I
  37.         End If
  38.     End If
  39. End Sub
This post was edited on 2017-01-07, 12:15 by Alex.
Avatar
Alex #8
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I asked for the Xml logs, not more vb code.
Avatar
hossam2 #9
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
answered it
thanxxxxxxxxxxxxxxxxxxxxxxxxxxxx Alex

(f) (f) (f)
Avatar
hossam2 #10
Member since Jan 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
i make a Chat Massnger
adventges
1- Get contact and show
2- set avetar
3- join rooms
4- massge pvt
5- bookmark
6- send fill
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS