CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    1

    maximise and minimise event

    hi,
    i want to detect maximise and minimise event in java.....
    like if internet explorer is minimised or maximised or closed i want to display a message or do something........

    similarly for other windows i want to detect whether they are maximised or minimised

  2. #2
    Join Date
    Oct 2010
    Posts
    15

    Re: maximise and minimise event

    add a window listener to your window and implement windowIconified method

  3. #3
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: maximise and minimise event

    You can only use window listeners to detect changes in windows created by the JVM your detection code is running in. If you want to detect changes in other windows running on your machine you would need to interact with the OS which languages such as C++ are better suited to do. You can interact with the OS in Java but only through process or JNI calls to native code.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  4. #4
    Join Date
    Oct 2010
    Posts
    15

    Re: maximise and minimise event

    My bad, I didn't read OP's question carefully. I guess the options then are to use JNI to interface with Windows API or look for some library that already does this for you. Sorry I can't be of more help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured