Hi I need help to solve minimzing IE windows.
Bascially, I have 2 IE windows, let's name it ieA and ieB.
When user click a button on ieA, I need to minimize ieA and show or display ieB.

for minimzing
I have tried calling script function

function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}

and calling an exe( in VC++ using Findwindow and showwindow) using process.start()
Both doesn't work.

For displaying existing ie, I've tried calling window.open. It doesn't work too.

Please help. Thank you

Try this javascript function

<script>
show=1
function minimize(){
  moveBy(2000,2000)
  show=0
}
function reshow(){
  if(show==0{
    moveBy(-2000,-2000)
    show=1
  }
}
</script>

You need to put a onfocus=reshow() to the body tag. Also, call the minimize() function in onclick event of a button.

A complete example

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DemoPage6.aspx.cs" Inherits="DemoPage6" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Minimize IE</title>
    <script language="javascript">
        show = 1
        function minimize() {
            moveBy(2000, 2000)
            show = 0
        }
        function reshow() {
            if (show == 0) {
                moveBy(-2000, -2000)
                show = 1
            }
        }
    </script>

</head>
<body onfocus="reshow()">
    <form id="form1" runat="server">
    <div>
        <input id="Button1" type="button" onclick="minimize()" value="button" />
    </div>
    </form>
</body>
</html>

It does minimize the browser by 'disappearing' the window but window cannot be restored by a single click in this case.

For the reshow() part, I need to restore or bring forward another existing browser, not restoring the current minimized browser.
Please help.

Thank you

This article has been dead for over six months. Start a new discussion instead.