Im having an odd problem here. My program subclasses another program so that I can add menu items to it, and interact with my program through the 3rd party programs menu.
The problem I am having is, when I click the menu item on the 3rd party program that shows my program's form, my form does not always become the active form (not focused, and not ontop).
I have tried, setforegroundwindow, setfocus, bringwindowtotop, setwindowpos, changing the zorder to 0, and a few other things, but I simply can't get it to consistantly be focused and ontop. Im not sure if I am calling it at the wrong time, or what I am doing wrong.
Thanks in advance!