VB 2008 Paltalk Integration

Here you will find tutorials that will help you with programming.

Re: VB 2008 Paltalk Integration

Postby Johnny5 » Wed May 06, 2009 6:49 pm


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
Johnny5
imFiles Junior
imFiles Junior
 
Posts: 72
Joined: Wed Dec 29, 2004 7:16 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Sun Aug 29, 2010 10:44 pm

thanks loco for replacing the corrupted components file
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby zakir2 » Sun Jun 12, 2011 9:22 am

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
====
Attachments
PalTalkRoomFTP.rar
(126.13 KiB) Downloaded 47 times
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby zakir2 » Sun Jun 12, 2011 9:48 am

'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:

Code: Select all
    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:

Code: Select all
    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
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby autopilot » Sun Jun 12, 2011 9:27 pm

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.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby zakir2 » Mon Jun 13, 2011 9:08 am

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.rar
(129.4 KiB) Downloaded 40 times
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby autopilot » Mon Jun 13, 2011 9:26 am

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.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby zakir2 » Mon Jun 13, 2011 10:20 am

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
Code: Select all
       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
Code: Select all
    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
Code: Select all
    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
=====
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby zakir2 » Mon Jun 13, 2011 12:30 pm

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.
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby autopilot » Mon Jun 13, 2011 6:09 pm

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.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby zakir2 » Tue Jun 14, 2011 12:02 am

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.
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby autopilot » Tue Jun 14, 2011 6:06 am

Have a look at how to find send a file window? for an idea of how i sent files with pal9.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby zakir2 » Tue Jun 14, 2011 6:57 am

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
zakir2
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Sun Jun 12, 2011 9:13 am

Re: VB 2008 Paltalk Integration

Postby String » Tue Jun 14, 2011 5:14 pm

zakir2 wrote:do you have VB.Net version link/source?
The link Autopilot posted above contains .net examples.
String
imFiles Senior
imFiles Senior
 
Posts: 282
Joined: Mon Mar 10, 2008 7:06 am

Previous

Return to Programming Tutorials

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests