Restoring window from the system tray when allowing only one instance of that program

前端 未结 2 1557
长情又很酷
长情又很酷 2020-12-11 08:47

ok, the title is pretty long and should tell the problem i\'m facing with.

Here is the code when minimizing to icon tray:

void MainFormResize(object          


        
2条回答
  •  醉梦人生
    2020-12-11 09:07

    After looking through dozens of solutions including the link from Hans, I do not believe that the accepted answer's link will restore an app from the systray. All it seems to be doing is correctly managing a single instance and passing arguments to the single instance.

    A more complete solution which was able to manage single instance, restore a minimised window and restore a systray window can be found on codeplex here. http://www.codeproject.com/KB/cs/SingleInstanceAppMutex.aspx

    It's also extremely simple to incorporate into your own code.

提交回复
热议问题