VB 2008 Paltalk Integration

Viewing 15 posts - 31 through 45 (of 57 total)
  • Author
    Posts
  • #190323
    Johnny5
    Member

    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.

    Regards,
    J5

    #190322
    autopilot
    Member

    thanks loco for replacing the corrupted components file

    #190321
    zakir2
    Member

    Hello,
    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
    ====

    #190320
    zakir2
    Member

    ‘Hello
    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

    New Code:

    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 Property
    #190319
    autopilot
    Member

    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.

    #190318
    zakir2
    Member

    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.

    Wishes ,
    zakir.
    project attachment.
    PalTalkRoomFTP

    #190317
    autopilot
    Member

    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.

    #190316
    zakir2
    Member

    Thanks your quick response. I will do accordingly.
    more over:
    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

    2.ReadListHnd

    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

    3.GetLastLineListNick

    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

     

    Wishes
    zakir
    =====

    #190315
    zakir2
    Member

    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.

    #190314
    autopilot
    Member

    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.

    #190313
    zakir2
    Member

    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.

    #190312
    autopilot
    Member

    Have a look at how to find send a file window? for an idea of how i sent files with pal9.

    #190311
    zakir2
    Member

    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.

    thanks,
    zakir

    #190310
    String
    Member

    @zakir2 wrote:

    do you have VB.Net version link/source?

    The link Autopilot posted above contains .net examples.

    #190309
    String
    Member

    Loco – All the images in the first part of this tutorial are missing. Are they lost or just misdirected?

Viewing 15 posts - 31 through 45 (of 57 total)
  • You must be logged in to reply to this topic.