Let me set the scene. I'm developing an application which should work anywhere where the flashing cursor thingy (caret) can be displayed.
I've tackled the problem ALMOST, but because my form (called frmMain) is active and on top of the other windows, i don't know how to set focus to ANY other open window/document.
Bascially what i'm trying to do is, when a button is clicked, the form (or my application) looses focus and focus is gained to an already open application and to an object that the user chooses in that application where the flashing cursor thingy (caret) can be displayed.
In another words this is what i need to achieve (remember this is just an example - the actual code needs to work with ANY application):
- 3 Applications are running
- User is currently using Internet Explorer and typing words into a search engine
- User decides he needs to use my application
- User loads up my application
- User clicks button called cmd1
Point A - My application looses focus
Point B - User selects the internet explorer window somehow and the text area where he was typing, somehow.
Point C - Upon selecting the text area where the caret can be displayed all text is highlighted.
- My application remains on top but not active (done this bit!)
Points A, B and C above, are the main problems i need help with.
I have seen a possible way of doing point A - Like in Jasc Paint Shop Pro's screen capture where jasc draws red boxes around objects and windows until the user clicks, then the object is captured
Same sort of functions i want to achieve only when the User clicks text should be highlighed - but don't know how the hell Jasc did it.
Please if you have an idea of how to achieve this, post it with some code to guide me.
I THANK YOU in advance!!!
The Coding Freak
P.S. Using Visual Basic 6
0 · ·