- This topic has 19 replies, 6 voices, and was last updated 18 years ago by Admin.
-
AuthorPosts
-
September 14, 2006 at 2:29 pm #188447MichaelMagdyMember
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,
MichaelSeptember 14, 2006 at 2:40 pm #188466AdminAdministratorsyxx made a tut about this a long time ago…it can be found here.
September 16, 2006 at 5:08 am #188465BattleStar-GalacticaMembercopy this code into your command button, it works for all version 8.x
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
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
September 16, 2006 at 8:26 am #188464MichaelMagdyMember@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 🙄
thanks
September 16, 2006 at 8:35 am #188463MichaelMagdyMembernanomachine007 wrote:Thanks very much sir
I will check it and advice you with the result.
September 16, 2006 at 10:51 am #188462DepartureMembernamomachine, thats the same code and consts i was trying to explain to Admin, this way you dont need to know the ever changing handel of atl#####
September 16, 2006 at 6:10 pm #188461BattleStar-GalacticaMemberyepe, now he has the full example
September 16, 2006 at 6:10 pm #188460AdminAdministrator@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 😆
September 17, 2006 at 12:34 am #188459AdminAdministratoryou 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’)
September 17, 2006 at 12:56 am #188458AdminAdministratori know about the hovering…although most ppl dont hover.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..
September 17, 2006 at 2:22 am #188457AdminAdministratorwell…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…
September 18, 2006 at 9:34 pm #188456MichaelMagdyMemberi did it all
but i didn’t get it right
pls any one help me
September 18, 2006 at 10:03 pm #188455NewbieMemberFirst:
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:
Dim parent as Long, child as long, alt as long, rich20 As Long
Second, your API and constant are not declare:
Add:
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
September 18, 2006 at 10:27 pm #188454PoniesMemberMy Child is longer then your’s.
September 18, 2006 at 10:36 pm #188453BattleStar-GalacticaMemberjust redownload file and it’s ok
-
AuthorPosts
Related
- You must be logged in to reply to this topic.