I’ve written a DLL which allows users to specifiy an Access table and transfer the contents to an AS/400 system. The DLL has a form which is a progress meter & is displayed during the different stages of the DLL transfer.
The form is displayed fine when I test from my VB6 environment, everything works how it’s supposed to. However, when I use the same bit of code in Access 97 the progress form isn’t displayed.
Any ideas on this one? I know you can use DLL forms in Access as I tested another DLL that does some DB sign on stuff, the only difference there is that the form is displayed modally.
I’m using a function to set the window on top as it is created…
Public Sub SetWindowOnTop(ByVal lhwnd As Long, Optional ByVal optvbTop As Boolean = True)
Dim iTopMost As Integer
iTopMost = IIf(optvbTop, HWND_TOP, HWND_NO_TOPMOST)
SetWindowPos lhwnd, iTopMost, 0, 0, 0, 0, NOMOVE Or NOSIZE
End Sub
This should put the window into focus if it has displayed the form shouldn’t it? Can’t figure it out….!
Thanks