vb6 Send text to any pal version

You can talk about VB programming here

Re: vb6 Send text to any pal version

Postby String » Thu Apr 02, 2009 9:10 pm


Method, if you ask the same question in two or more threads... Its likely all your questions will be ignored.
Autopilots example found here works fine.
Download a fresh version, and find this in the code.
Code: Select all
Private Function getSubForm

Once you have found it, change it from Private to Public.
Works with all pal versions >9.3
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Re: vb6 Send text to any pal version

Postby method » Thu Apr 02, 2009 10:02 pm

Many thanks string for your reply. I made the change but still get this error:


compile error:

Expected function or variable


pointing at FindSubWindsWithwHnd
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: vb6 Send text to any pal version

Postby String » Thu Apr 02, 2009 10:24 pm

Find the following line of code, and comment it out or remove it.
Code: Select all
lRet = FindSubWindsWithwHnd
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Re: vb6 Send text to any pal version

Postby method » Thu Apr 02, 2009 10:31 pm

No error but doesn't send any text to the room !!
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: vb6 Send text to any pal version

Postby String » Thu Apr 02, 2009 10:52 pm

Find this function
Code: Select all
Private Function SendTextHnd() As Long

Replace the code inside of that function with this code
Code: Select all
Dim iHnd As Long
iHnd = getPalSubForm(WindowClass, Combo1.Text, SplitterClass, SplitterIndex)
SendTextHnd = ChatHnd(iHnd, SendTxtIndex)


In your module GetSubFormHnd, add this function to it.
Code: Select all
    Public Function ChatHnd(ByVal hwnd As Long, ByVal lParam As Long) As Long
        Dim retVal As Long
        mTargetSubClass = "RichEdit20A"
        mTargetSubClassIndex = lParam
        IndexCount = 1
        retVal = EnumChildWindows(hwnd, AddressOf EnumChildProc, lParam)
        ChatHnd = mSubFormHnd
    End Function
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Re: vb6 Send text to any pal version

Postby method » Thu Apr 02, 2009 11:02 pm

Now this error:

compile error:

sub or function not defined


pointing at :ChatHnd
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: vb6 Send text to any pal version

Postby String » Thu Apr 02, 2009 11:06 pm

I edited my post above. Add the ChatHnd function to your module
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Re: vb6 Send text to any pal version

Postby String » Fri Apr 03, 2009 9:45 pm

you're welcome...
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Re: vb6 Send text to any pal version

Postby method » Sat Apr 04, 2009 6:18 am

many thanks string it worked well.furthermore how to read lastline in 9.6?
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: vb6 Send text to any pal version

Postby String » Sun Feb 07, 2010 2:31 pm

For those interested, in Paltalk 9.9 beta the splitter window has been renamed.

9.8 and below - WTL_SplitterWindow
9.9 beta - SplitterWindowEx
-= Please ask your questions in the forum, not in pm.
String
imFiles Senior
imFiles Senior
 
Posts: 313
Joined: Mon Mar 10, 2008 7:06 am
Location: IDE

Previous

Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

cron