TAF2000
asked on
Making my window focused and ontop
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!
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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nope.. that didn't do the trick either.. yet it works sometimes.. not always..
ASKER
Anyone else have any ideas what would cause those commands to not be affective? They will bring the form above other forms in my program, but not above the window I need it to be above. No, the window is not always ontop.
Thanks,
TAF
Thanks,
TAF
ASKER