Shooting from the hip...
If I were to try to embed a cmd.exe window in an HTML page, my approach
would be to simulate it. Specifically, I would make a VBScript app
(say HTMLcmd.vbs) which would start up an instance of IE and go to
the page that has the embedding simulator (or alternately, have the
HTMLcmd.vbs monitor instances of IE for this page). Once the user
(me) is at this page, I would have the HTMLcmd.vbs bring up a DOS box
(cmd window) and size it (I'm assuming that can be done programatically -
never tried) to the desired size (perhaps there is a DIV or something
on the page which should 'contain' it, so I would examine the DOM to
find the appropriate size. Or if that doesn't work, size the DIV/page
to the DOS box). Then I would position the DOS box to the appropriate
place on the page. Once nice thing about this approach is that you
don't have to worry so much about security restrictions (except with
cross domain I/Frames, which are (needlessly, considering the user
started VBScript app is doing the accessing) VERY pesky to bypass).
At this point there are two ways to go. If you position the DOS box
over the web page, you effectively have two distinct apps. You could
monitor the position/size of each through the HTMLcmd.vbs, but
keystrokes and mouse going to the cmd prompt are way hard for the web
page to intercept, I would expect. Plus you have (depending on your
sense of aesthetics) a title bar and border that you can't do very
much about. This route is not particularly appealing to me.
On the other hand, you could place the cmd prompt behind the IE page
(I've never tried this, but couldn't you make the background to be
transparent, possibly by having a transparent gif or setting an
opacity setting (I forget what it's called offhand)?). Then, your
web page can intercept keystrokes and pass them to the DOS box
as appropriate. There's a lot of ifs here, and it would be some
work to pull this off, but it seems feasible.
Based on your post, I expect this is way beyond the scope of what you
are trying to do, and it is not for the novice VBScript programmer, but
if you do it, it would be nice to see a posting to that effect.
Csaba Gabor from Vienna