How to Check the Windows already Open

I have Menu Bar Like Transaction when i am click ,open the Create transaction window should be open .
again i am going to try to open the Create Transaction window .

how to give the warning Message like "Already create Transaction Window opened"

how to check the window currently open or Not ?
if i am click the opened window , give some warning message and show the old opened window.?