Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
azerty88000 #1
Member since Jul 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to know user status when OnPresence was already fired
Hi,

I'm french (sorry for my probably bad english!) and I have a question.

In my program, there is the mainForm where all users are listed (with their status) and I want to open a new form (newForm) which is almost the same. My question: How to know (in this new Form) user's status when OnPresence was already fired in mainForm?

Thank you and have a good day!
Avatar
Techno_Clubber #2
Member since Aug 2011 · 3 posts · Location: Tarragona (Spain)
Group memberships: Members
Show profile · Link to this post
  1. Dim Frm as New mainForm
  2. Frm.show()
Avatar
azerty88000 #3
Member since Jul 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Thank you for your answer, but I know how to open a new Form. The question is "How to fire the event OnPresence in this new Form to receive the statuts of other user's?"
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You have to pass the XmppClientConnection instance to your form. Then you can setup the OnPresence handler directly in your form. You can also use the PresenceGrabber to filter by Jid in your form.

Alex
Avatar
azerty88000 #5
Member since Jul 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Thank you for your help, but when I open the new form I don't know the user's statuts until it change (until the OnPresence event fire). Sorry if you don't understand.
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You know the Presence in your main form. You have to pass it as a parameter to your new form.

Alex
Avatar
azerty88000 #7
Member since Jul 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Ok, thank you very much for your help!
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