May 6, 2009 at 11:49 pm #33606Johnny5Member
What I’ve done in my code is create a paltalk class that will have everything to read text and send text, the class will contain a timer (timer to read text). In this class will have an event.
'Declaration Dim Timer As New Timer Public Event NewChatLines(ByVal arChatLines As ArrayList) Public sLastChatLine As String Public arrNewChatLines As ArrayList Public Sub New() Timer.Interval = 500 ' 1/2 second AddHandler Timer.Tick, AddressOf Me.Timer_Tick Timer.Start() End Sub Private Sub Timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Dim arrNewLines As ArrayList = GetRoomTextUnreadLines() If arrNewLines.Count > 0 Then RaiseEvent NewChatLines(arrNewLines) End If End Sub Public Function GetRoomTextUnreadLines(Optional ByVal LastLine As String = "") As ArrayList Dim arrTxt As New ArrayList, arrRetTxt As New ArrayList 'separated the previous scanned lines to get new lines. Remember last line is empty. 'add to arrRetTxt the new lines and return Return arrRetTxt End Function
hopes this will help out some of you guys. This way you can compile into DLL file and reference in your apps.
J5August 30, 2010 at 3:44 am #33581
thanks loco for replacing the corrupted components fileJune 12, 2011 at 2:22 pm #33607
I need help from you.
I have created a simple project with integrating .VB and dll . I have added control in tool named ‘CtrlRoomSelector’ as followed your guideline. but when form loading Chat Rooms cannot appearing. I am using PalTalk 10.0 Build 403 . Visual Studio 2010 professional VB.NET
Please check project I have added in attached. Your early response with guideline will be appreciated.
Wishes , zakir
====June 12, 2011 at 2:48 pm #33608
I have fix it. I have using PalTalk 10 so it goes Else That’s why room list are not apprearing.
Now it is apprearing well . I will update defined code…… later.
by the way can any one share me how can send File to user of selected room’s PALs
Public ReadOnly Property ChatRoomClass() As String Get If _ChatRoomClass = "" Then Select Case mdlPalInfo.PalMajorVer Case 8 _ChatRoomClass = "My Window Class" Case 9 _ChatRoomClass = "DlgGroupChat Window Class" Case 10 _ChatRoomClass = "DlgGroupChat Window Class" Case Else '_ChatRoomClass = "Error" End Select End If Return _ChatRoomClass End Get End Property
Old Code was:
Public ReadOnly Property ChatRoomClass() As String Get If _ChatRoomClass = "" Then Select Case mdlPalInfo.PalMajorVer Case 8 _ChatRoomClass = "My Window Class" Case 9 _ChatRoomClass = "DlgGroupChat Window Class" Case Else _ChatRoomClass = "Error" End Select End If Return _ChatRoomClass End Get End PropertyJune 13, 2011 at 2:27 am #33609
glad you were able to figure it out on your own. it always makes you understand the code better when you trace down a problem like this.June 13, 2011 at 2:08 pm #33610
I am very glad atleast you have replied my post.
Now I am have few problems to get it:
1.I cannot get richtext text data
2.I cannot put richtext data
3.I cannot get room’s users
4.can you help me how can send File to user of selected room’s PALs?
Please see project what I am doing. Your solution/idea will be very helpful for me. My client has very needed to this solution.
PalTalkRoomFTPJune 13, 2011 at 2:26 pm #33611
Previous to version 10, Paltalk was using a RicheditA window for both the send and recieved text controls. This is an ANSII control and not the best for handling other languages. In version 10, they have switched to a unicode compatible RicheditW control. So you must change your class name as well as change how you read the unicode text from the recieved text control. Do some searching and you should be able to figure it out.June 13, 2011 at 3:20 pm #33612
Thanks your quick response. I will do accordingly.
Can you give idea how to get nick list of selected room.I have written below code but no luck to get list of user/s(nick) of selected Room:(I am a novice in this PAL talk )
1.add nick to ListItem
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click Dim iHnd As Integer iHnd = ReadListHnd() Dim sNickText As String = GetLastLineListNick(iHnd) Me.ListView1.Items.Add(sNickText) End Sub
Private Function ReadListHnd() As Integer ' Incoming Nick List Dim iHnd As Integer iHnd = mdlGetHnd.SubFormHndByClassNameWithMWClassWithPartialMWCaption(mdlPalInfo.ChatRoomClass, Me.CtrlRoomSelector1.RoomName, mdlPalInfo.SplitterClass, mdlPalInfo.SplitterIndex) iHnd = mdlGetHnd.SubFormHndByClassNameWithMWHnd(iHnd, mdlPalInfo.NicListClass, mdlPalInfo.NicListIndex) Return iHnd End Function
Public Function GetLastLineListNick(ByVal hwnd As Integer) As String Dim iLastLine As Integer Dim strBuffer As New StringBuilder(255) 'Get Line count iLastLine = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0) 'get line text Call SendMessageString(hwnd, EM_GETLINE, iLastLine - 2, strBuffer) Return strBuffer.ToString End Function
=====June 13, 2011 at 5:30 pm #33616
Hello, I have read your instruction again where had written
I did not use the mdlSysListView, but you can use it to find and/or highlight a nic in the room nic list.
can you please write steps what to do, to get all nick in list from selected room.
I need this for my project …..
Please give idea….
wishes, zakir.June 13, 2011 at 11:09 pm #33613
First of all, you can not read nics from the syslistview with the same method that is used for a edit/text window. You will need to use the correct method of injecting into the Pal nic list memory space and then retrieving the data. Again Pal 10 has changed somewhat the configuration of the nic list, but string and others have posted the changes.
I do not do much with Pal anymore and have not really looked into all the changes of Pal 10, so I dont have specific directions for you.June 14, 2011 at 5:02 am #33614
My Last query/request is
can you please give me line of code how to send file to specified nick/user? your this help will be really appreciative for me. Wishes zakir.June 14, 2011 at 11:06 am #33615
Have a look at how to find send a file window? for an idea of how i sent files with pal9.June 14, 2011 at 11:57 am #33617
Hello autopilot, many thanks for your quick reply.
do you have VB.Net version link/source? I need to run project on win7 32/64.
zakirJune 14, 2011 at 10:14 pm #33618StringModerator
do you have VB.Net version link/source?
The link Autopilot posted above contains .net examples.March 21, 2012 at 4:35 am #33619StringModerator
Loco – All the images in the first part of this tutorial are missing. Are they lost or just misdirected?
- You must be logged in to reply to this topic.