i need help update trivia bot from 9.1 to 9.2 thanks

Private Sub Form_Load()
Dim hWndForm As Long
'get the form handle
hWndForm = FindWindow(vbNullString, "<PaltalkWindowCaption>")
'enumerate child windows of the window
If hWndForm <> 0 Then EnumChildWindows hWndForm, AddressOf EnumChildProc, ByVal 0&
End Sub
'=================
'In a standard module
Option Explicit
Public Declare Function EnumChildWindows Lib "user32" _
(ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
(ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
'call back function
Public Function EnumChildProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
'assuming it is a Richedit box, other wise change the class name
If GetClsName(hwnd) = "RichEdit20A" Then
GlobalRichEditString = hwnd
End If
'continue enumeration
EnumChildProc = 1
End Function
'gets the class name
Public Function GetClsName(ByVal hwnd As Long) As String
Dim lpClassName As String
Dim RetVal As Long
lpClassName = Space(256)
'retrieve the class name
RetVal = GetClassName(hwnd, lpClassName, 256)
'Show the classname
GetClsName = Left$(lpClassName, RetVal)
End Function



Users browsing this forum: No registered users and 0 guests