PDA

Click to See Complete Forum and Search --> : Communication between forms


DragonSteve
Nov 2nd, 2000, 10:14 AM
Hi,
I've made a shell-program in outlookstyle.
From within that shell I open other programs that
are of type ActiveX DLL with form.
The shell is an exe file.
Now I want to communicate from within my ActiveX DLL with
the shell.
More specific, I want, when the ActiveX DLL gets the focus,
that there is a method triggered in the shell.

Is there somebody who could help me.

THANKS

Nov 2nd, 2000, 02:29 PM
Use FindWindowEx to find your previous App

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 Sub Form_GotFocus()
Dim APP_HWND As Long

'If you have VB6, change ThunderRT5Form to ThunderRT6Form
APP_HWND = FindWindowEx(0, 0, "ThunderRT5Form", "App Title")
If APP_HWND <> 0 Then
'Do a method here
End If
End Sub