The program is blowing up at this point:
Code:Private Sub DoCapture_Click() Dim str_temp0 As String, i As Integer Dim aMsg As Msg Open "C:\downloads\xxx.xxx" For Output As #1 Do While i < 1000 dummy = GetMessage(aMsg, TargetWindowHandle, 0, 0) str_temp0 = Str$(aMsg.hWnd) & "|" str_temp0 = str_temp0 & Str$(aMsg.lParam) & "|" str_temp0 = str_temp0 & Str$(aMsg.message) & "|" str_temp0 = str_temp0 & Str$(aMsg.pt) & "|" str_temp0 = str_temp0 & Str$(aMsg.time) & "|" str_temp0 = str_temp0 & Str$(aMsg.wParam) & "|" Print #1, str_temp0 i = i + 1 Loop Close #1 Xit_DoCapture_Click: End Subthe error message is:Code:Type Msg hWnd As Long message As Long wParam As Long lParam As Long time As Long pt As POINTAPI End Type
DoCapture is a command button.Compile Error:
Only user defined-types defined in public object modules
can be coerced to or from a variant or passed to late bound
functions.
TargetWindowHandle is global. I get the same message when it
is set and when it is not.
Type POINTAPI has been properly typed.
Any ideas on what kind of stupid thing I've done?


Reply With Quote
