Paltalk send text

You can talk about VB programming here

Paltalk send text

Postby MichaelMagdy » Thu Sep 14, 2006 9:29 am


Dear All,

Please I notice that there is many program made by VB6 .

Can any one advice my with the code

I need just a little example

Form1

Command1

Text1


Command1= to send the text (text1.text) to paltalk room or pm ( the active window)

Hope some on can help my with the correct source form new paltalk


thanks in advance

With Best Regards,
Michael
Michael Magdy
MichaelMagdy
imFiles Newbie
imFiles Newbie
 
Posts: 34
Joined: Mon Jul 03, 2006 4:16 am

Postby Ghost » Thu Sep 14, 2006 9:40 am

syxx made a tut about this a long time ago...it can be found here.
Last edited by Ghost on Sat Sep 16, 2006 7:34 pm, edited 1 time in total.
Ghost
 

Postby BattleStar-Galactica » Sat Sep 16, 2006 12:08 am

copy this code into your command button, it works for all version 8.x
Code: Select all
Dim parent, child, alt, rich20 As Long
parent = FindWindow("My Window Class", vbNullString)
child = FindWindowEx(parent, 0, "WTL_SplitterWindow", vbNullString)
child = FindWindowEx(child, 0, "WTL_SplitterWindow", vbNullString)
child = FindWindowEx(child, 0, "WTL_SplitterWindow", vbNullString)
alt = GetWindow(child, GW_CHILD)
alt = FindWindowEx(alt, 0, "AtlAxWin71", vbNullString)
alt = FindWindowEx(alt, 0, "#32770", vbNullString)
rich20 = FindWindowEx(alt, 0, "RichEdit20A", vbNullString)
rich20 = FindWindowEx(alt, rich20, "RichEdit20A", vbNullString)
Call SendMessageSTRING(rich20, WM_SETTEXT, 0&, "testing")
Call SendMessageLong(rich20, WM_KEYDOWN, 13, 0&)



and you need these declarations on top of your form1

Code: Select all
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const GW_CHILD = 5
Private Const GW_HWNDNEXT = 2
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HE
Private Const WM_SETTEXT = &HC
Private Const WM_KEYDOWN = &H100
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby MichaelMagdy » Sat Sep 16, 2006 3:26 am

Ghost wrote:syxx made a tut about this a long time ago...it can be found here.


thanks sir for your replay

but can you please advice my with the link about the tut , because I searched a lot :roll:

thanks
Michael Magdy
MichaelMagdy
imFiles Newbie
imFiles Newbie
 
Posts: 34
Joined: Mon Jul 03, 2006 4:16 am

Postby MichaelMagdy » Sat Sep 16, 2006 3:35 am

[quote="nanomachine007"][/quote]

Thanks very much sir

I will check it and advice you with the result.
Michael Magdy
MichaelMagdy
imFiles Newbie
imFiles Newbie
 
Posts: 34
Joined: Mon Jul 03, 2006 4:16 am

Postby Departure » Sat Sep 16, 2006 5:51 am

namomachine, thats the same code and consts i was trying to explain to locohacker, this way you dont need to know the ever changing handel of atl#####
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby BattleStar-Galactica » Sat Sep 16, 2006 1:10 pm

yepe, now he has the full example
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby NinjaCoder » Sat Sep 16, 2006 1:10 pm

Ghost wrote:syxx made a tut about this a long time ago...it can be found here.


yes....but he doesnt write complete sentences sometimes....lol....im completely lost in the middle of his tutorial...think im gunna have to ask him to be more specific...lol :lol:
NinjaCoder
 

Postby Ghost » Sat Sep 16, 2006 7:34 pm

you retards need to start hovering over the shit i write...if i say 'it can be found here' with no links, then ive made 'here' into a link...like ive done here.(hover over the word 'here')
Ghost
 

Postby NinjaCoder » Sat Sep 16, 2006 7:56 pm

i know about the hovering...although most ppl dont hover.lol.. :lol: ..im saying that i read that tutorial and in the middle im completely lost....cus i know almost nothing about VB lol....i understood most of it....but one part of it wasnt dumbed down enough..lol..
NinjaCoder
 

Postby Ghost » Sat Sep 16, 2006 9:22 pm

well...it was sorta directed toward you as well because u didnt know about the links i put in for vbforums and PSC on the other topic...

anyways...use what nano said...it seems easier...just dont forget to declare the functions...
Ghost
 

Postby MichaelMagdy » Mon Sep 18, 2006 4:34 pm

i did it all

but i didn't get it right

pls any one help me
Attachments
Desktop.zip
the file i made
(1.74 KiB) Downloaded 101 times
Michael Magdy
MichaelMagdy
imFiles Newbie
imFiles Newbie
 
Posts: 34
Joined: Mon Jul 03, 2006 4:16 am

Postby Newbie » Mon Sep 18, 2006 5:03 pm

First:
Code: Select all
Dim parent, child, alt, rich20 As Long
isn't right in VB6. You can do that in Vb.NET, but in VB6 rich20 is a long datatype and parent, child, alt are variant. It Should be like this:

Code: Select all
Dim parent as Long, child as long, alt as long, rich20 As Long


Second, your API and constant are not declare:

Add:

Code: Select all
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const GW_CHILD = 5
Private Const GW_HWNDNEXT = 2
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HE
Private Const WM_SETTEXT = &HC
Private Const WM_KEYDOWN = &H100

TO the top of your form
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby Ponies » Mon Sep 18, 2006 5:27 pm

My Child is longer then your's.
Ponies
BANNED
BANNED
 
Posts: 5322
Joined: Sun Apr 30, 2006 8:59 am

Postby BattleStar-Galactica » Mon Sep 18, 2006 5:36 pm

just redownload file and it's ok
Attachments
Desktop.zip
(2.36 KiB) Downloaded 133 times
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Next

Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests