我工作的应用程序(C#2.0)。我在它执行单一实例。一切安好。 如果我再次运行应用程序,它显示消息框,说:实例已在运行。
I am working on the application (C# 2.0). I have implemented single instance in it. Everything is fine. If i run the application again, it shows messagebox saying "instance is already running".
其实我并不想通过显示消息框,该消息。
Actually i don't want to show the message through messagebox.
我想显示使用已经运行实例的气球提示该信息(它有通知系统托盘图标)。
I want to show this message using Balloon tip of already running instance (it has notify icon in system tray).
我怎样才能做到这一点?
How can i achieve this?
在此先感谢。
您需要的进程间通信,发信号给另一个实例,它应该显示消息框。
You need a form of interprocess communication, to signal to the other instance that it should display the messagebox.
在这种情况下,你可以去比告诉现有的实例,以显示该消息一筹,而是告诉它来恢复它的主窗口(即unminimise)。
In this instance, you could go one better than telling the existing instance to display the message, and instead tell it to restore it's main window (i.e. "unminimise").
上一篇:使用了不同.NET语言的?不同、语言、使用了、NET
下一篇:我可以使用XamlReader.Load或InitializeFromXaml从WPF窗口,为窗口定义?窗口、可以使用、定义、XamlReader