hi what i want to do is if once the window is created by executing the code,if next time i execute the same code it should check wether the window is open or not.if the window is open it should close the previous window.and create the new window. is it possible to do this.if yes please give idea how to do this. regards vidhya
see my task is when i first execute my exe file one banner window will display on the desktop it will always be running.when next time i execute exe with some argument the argument should display in the same banner. what i thought was when i execute exe file second or third time i will close the previous window and open in new window. what i want is single instance of the window.
You don't need to do it that way. The better way is say you have some Message WM_COPYDATA to send to the old executable some data (Say command Line data). Now when getting the WM_COPYDATA the exe just updates its content accordingly. Now after sending the message (new running version) should be killed or closed and now you have single instance with the update happening each time you run the exe with the command line.