• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2180
  • Last Modified:

Minimize, Restore and Maximize browser window (from Java applet)?

Hi,

I am running a Java applet and based on some events I want to maximize, minimize or or restore a minimized window.

I can call JavaScript or if possible do it in an applet (which I doubt).

Thanks!

PS.  I tried these - that I found on the Internet, but they did not work for me:

 function minimize_window(){
     window.blur();
 }

 show=1
 function minimize1_window(){
   window.moveBy(2000,2000)
   show=0
 }
 function reshow_window(){
   if(show==0) {
     window.moveBy(-2000,-2000)
     show=1
   }
 }

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

function maximize2_window() {
    window.innerWidth = screen.width;
    window.innerHeight = screen.height;
    window.screenX = 0;
    window.screenY = 0;
    alwaysLowered = false;
}

function maximize2_window() {
  window.moveTo(0, 0);
  window.resizeTo(window.screen.availWidth, window.screen.availHeight)
}
 function reshow_window(){
 window.focus()
}
0
akoifman
Asked:
akoifman
  • 3
1 Solution
 
mvan01Commented:
Hi akoifman,

I use the following in the head of one of my .htm file to make itself full screen, and it works for me every time in IE.  But note:  this is in the file loaded into the popped browser window - it sizes itself.

Peace and joy.  mvan


<script>
// ----- take focus and open browser full size -->
      window.focus();
      window.moveTo(0, 0);
        av_height = screen.height - 20
        window.resizeTo(screen.width, av_height);
// ----- end open and full sizer code -->
</script>
0
 
akoifmanAuthor Commented:
This question has not been answered.  How to minimize a browser window.
0
 
mvan01Commented:
You are right, I've only answered how to resize the browser, not how to minimize or restore it.  (Actually ... not even how to maximize it!)

I see you're really looking for minimize, maximize, and restore.

I don't have the answer at this moment.

Peace and joy.  mvan
0
 
mvan01Commented:
According to: http:Q_20269069.html#6813358 you cannot use JavaScript to maximize a window.

According to: http:Q_10334328.html#2752410 you cannot minimize a window, because the 'method' does not exist.

If you created the window, you can restore it, using the .focus() method.  See:  http:Q_20656829.html#8781188

Peace and joy.  mvan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now