No, I haven't got VB6, I use VB.NET 2010. I do not use styx to commincate with DBPRO, I use Matrix1. Here is my event message function:
Function WindowMessage(hwnd as dword, ms as dword, wparam as dword, lparam as dword)
` Windows messages are sent to this function
Local iResult
ENDFUNCTION iResult
And here is the means to linking the function with windows messages:
SET MESSAGE CALLBACK "WindowMessage" ` Requires Matrix1 plugin
REMSTART
This function will be called whenever a standard windows message is sent to the DBPro window.
The function should have the standard 4 parameters required by a WndProc routine (Window handle, Message, wParam and lParam), and should return an integer or dword result.
The returned value will be ignored UNLESS you have called the STOP CURRENT MESSAGE, in which case the value will be returned to the windows message loop.
If you have not call the STOP CURRENT MESSAGE command, then the message will be forwarded on to the standard DBPro message handler, and the return value of that call will be returned to the windows message loop.
Your function should look like this:
FUNCTION YourFunctionName(hwnd as dword, msg as dword, wparam as dword, lparam as dword)
ENDFUNCTION result
A FunctionPointer value of 0 or a FunctionName of "" will cause the callback to be disabled.
REMEND
Additionaly I use forms controls to communcate using the BBB GUI plugin, Dark NET (A.K.A MikeNet networking plugin) for communication which works in both DBPRO and .NET 4.0 and finally a console implementing various string function libraries and slash commands using LUA, INI and XML.
Hope that helps