Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys,
This one is a tough and complex one so read ALL of it!

I want to be able to get an external windows application, customize it's title bar (make it look like what I want to a certain extent), then put it INSIDE my application without making my form an MDI Parent or with a panel.

Please help,
I don't know how to do this and haven't tried anything so far.
Posted
Comments
Maciej Los 18-Mar-15 2:45am    
Why? Who need such of functionality?
iProgramIt 18-Mar-15 2:53am    
That is not relevant at this current point in time.
Maciej Los 18-Mar-15 2:55am    
Relevant or not... i'm just trying to understand. Also, could you be so kind and and answer my question?
iProgramIt 18-Mar-15 3:01am    
Well, I need it because I am creating an Operating System Overlay.
[no name] 18-Mar-15 2:56am    
So, now you know! ;-)

1 solution

Launch the app with the Process class. Wait for it to be idle then get its MainWindowHandle from the Process class. Use this and the window handle of your host window, such as a Panel or whatever control you want, and call SetParent[^] to set the parent window of the app you launched to your window.

Be warned, the application WILL show up outside of your application briefly. There is no way around that.

You do NOT have control over the application.

Modifying the window title bar may be possible for some apps but not all and you won't be able to modify everything about the bar. The application you launch has complete control of its own title bar and you will not have ultimately authority over it.

Oh! I almost forgot. Not every application is going to let you change its parent window and some weird rendering may take place.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900