View Full Version : Embeding Window in a Page
joey1barnes
04-21-2004, 08:23 PM
I am working on a user interface for a University competition and need some help. I have a handful of 3rd part apps that I want to load (upon click of a button) and have embeded or atleast have the appearence of being embeded in the same page as the app-initiating button... I dont know how clear that was.
I could not find a way of embeding the .exe in each page. However, I am getting it open. Does anyone have direction as to how I may:
(1) size and position the .exe window to be centered and taking up ~60% of the screen... and then be pinned down so the user cannot move it once launched, at runtime.
(2) how to manipulate the window handle to perhaps modify the window to be absent of frames and borders through api mods... giving the impression of being embeded into the page.
let me know if I'm not being clear. This forum has helped me much thus far... and this is my first post!!! yeah!!!
Corey
04-21-2004, 08:28 PM
Worm had a .dll once, I don't know if that will do the trick, but there's no way to embed an application window within your application window just in AMS using standard actions. One would need a .dll or plug-in to do that i think.
BTW if you use Worm's .dll to enter a competition it's a good idea to name him in your credits so that your instructors are clear on who built the technology for the contest entry.
Best of luck! Let us know how you place... :)
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
joey1barnes
04-21-2004, 08:46 PM
Ill try worm's .dll and give props as needed.
many thanks... any other suggestions... anyone?
This is by no means a perfect solution. But it should give you a starting point. This uses the User32.DLL's SetParent function to embed Notepad into the app. Make sure to look at the Projects On Shutdown event. You need to be sure to close the window you've embedded too.
I am working on a user interface for a University competition and need some help. I have a handful of 3rd part apps that I want to load (upon click of a button) and have embeded or atleast have the appearence of being embeded in the same page as the app-initiating button... I dont know how clear that was.
I could not find a way of embeding the .exe in each page. However, I am getting it open. Does anyone have direction as to how I may:
(1) size and position the .exe window to be centered and taking up ~60% of the screen... and then be pinned down so the user cannot move it once launched, at runtime.
(2) how to manipulate the window handle to perhaps modify the window to be absent of frames and borders through api mods... giving the impression of being embeded into the page.
let me know if I'm not being clear. This forum has helped me much thus far... and this is my first post!!! yeah!!!
TJ_Tigger
04-21-2004, 09:28 PM
WOW that is fancy.
I'm a fancy Worm... yes I is!
WOW that is fancy.
Corey
04-21-2004, 10:18 PM
---> Teehee :lol
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
Intrigued
04-22-2004, 12:04 AM
That is interesting! Thanks for the sample Worm.
Very swanky!
joey1barnes
04-22-2004, 12:47 AM
I shall give my props as well. I will document the source accordingly.
No need on my part. This nothing you couldn't have figure out. It's not using a DLL I created, it uses a function already in windows.
I shall give my props as well. I will document the source accordingly.
TJ_Tigger
04-22-2004, 07:57 AM
Worm,
Is there a way to check if the app that is now within the AMS app is minimized and if so to restore it. when you minimize the app within it's parent window of AMS it disappears. Or is there a way to remove the title bar once you have placed it within your AMS project.
You could use the User32.DLL's IsIconic function to determine if it is minimized, returns a non zero long if it is.
All API IsIconic Link (http://www.mentalis.org/apilist/IsIconic.shtml)
There probably is a way to crop the title bar using SetWindowLong and messing with the Window Style or the Extended Style, but I've never done it myself.
The biggest caveat that I found was that the "hosted" app doesn't seem to redraw very well. If you find away around that let me know :)
Worm,
Is there a way to check if the app that is now within the AMS app is minimized and if so to restore it. when you minimize the app within it's parent window of AMS it disappears. Or is there a way to remove the title bar once you have placed it within your AMS project.
nirus
02-16-2005, 06:34 AM
This post is kind of old but I had an idea, maybe it has been done or fixed already?
It locks up but on page show...
while (1 < 2) do
Page.Redraw();
end
My attempt was to redraw the screen (hoping it would not eat the processor like a good steak) at all times, in turn hopefully making notepad show also.
hehe Does not work as I expected :)
-Nirus
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.