Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cMessenger class, handling incomingMessage, can't find SetForeGroundWindow.

Status
Not open for further replies.

Jwythe

Systems Engineer
Apr 21, 2020
2
0
0
CA
thread222-1293832

Thanks for this code Strongm. Works great on XP, with one issue. when I handle the incoming message and try to call SetForeGroundWindow I get an error that that function can't be found in run32.dll error 453
using VB6, DLL was created as an ActiveX DLL, but compiled as a regular DLL. Doesn't seem to matter if use a DLL or include code in my .exe. One exe is an Activex, sending a message to a regular .exe all code is in VB6
Seems strnage that my regular exe can call SetWindowForeGround when called from inside itself, but not when coming from the incoming Message Handler.

Attached is an image of instructions how to Modify VB6 to create a regular DLL, if you need them. I don't have the link to the page, but should be able to find it again.

Also if anyone knows how to get around another problem I have with this DLL I created, I get an error 429 when trying to run on Windows 10, seems the exe's cant find the DLL, or class. Probably because W10 thinks it is an active X, any other way to get the EXE to load the DLL? Prefer to use regular DLL, that an Active X, have had many issues with multiple Apps using Active X DLL's.

Thanks


 
 https://files.engineering.com/getfile.aspx?folder=83e13bf2-9290-4133-9a8d-8d66f24b8447&file=VB6_Regular_DLL.jpg
Found the issue with SetForegroundWindow, was an upper case/lower case G issue. Now just the error 429, guess I need to declare a class as being in a DLL, have to figure that out.
 
>class

Er ... you shouldn't be able to provide classes out of a classic DLL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top