|
-
Jan 6th, 2007, 08:46 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] How to force another program into my own
I am trying to create a program that will allow me to cram one or more instances/programs into a multi frame window. So basically...theoretically I could have 4 portions and open excel, word, AIM and Firefox....or any other program(s) I so choose.
I have thought over this considerably and the only thing I can come up with is get the handle of the window the program opens up in (is it always the same??) and then force that to redirect into my program....Anybody point me in the right direction? I am not even sure what this is called and even more confused about what to search for on the internet or the forums.
Thanks!!
-
Jan 7th, 2007, 01:43 AM
#2
Re: How to force another program into my own
You can use hte SetParent API but to do what you want for multiple third part programs may produce some unwanted effects for one or all programs "forced" as they are not designed to be child applications housed under a single parent program.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 7th, 2007, 06:52 AM
#3
Re: How to force another program into my own
SetParent requires you to pass the handle of the window in question which you can get using FindWindow. FindWindow works well when passed the Window caption. Is the Window caption always the same?
Having said that, RobDog888 brings up a very good point about the possibility of running into "unexpected features" when attempting to "force" an application to be a "child".
-
Jan 7th, 2007, 10:18 AM
#4
Thread Starter
Fanatic Member
Re: How to force another program into my own
Thanks for the replies I will work on that and let you know if I run into trouble. Oh and yes, the caption is always the same. I will also see if I can put a detect change on the caption that way I can hopefully be proactive on errors.
Thanks again!!
-
Jan 7th, 2007, 10:57 AM
#5
Hyperactive Member
Re: [RESOLVED] How to force another program into my own
Hehe, I did this a while ago as a way of freeing up space in my taskbar when I had multiple apps open at the same time. I called it "WinManage" ;D
P.S. You WILL get errors should you have 2 applications that wish to show a window modally at the same time. At least I did, anyway. Beware of that...
-
Jan 7th, 2007, 11:01 AM
#6
Re: [RESOLVED] How to force another program into my own
An example you can look at that I ran into a long time ago can be found in the below link:
http://www.codeproject.com/vb/net/ByPassAutomation.asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|