0

If another window is open and software is opened it will open minimized. Please force it to open above already opened instance. Do not allow to open one more instance when clicking on the shortcut icon from desktop.

Single Instance Was Working Fine but The Window cannot be Force to Reopen.

Windows Must Reopen while working on single Instance....

enter image description here

Pradeep
  • 9,667
  • 13
  • 27
  • 34
  • [Why not upload images of code on SO when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question) – Andreas Feb 01 '19 at 06:00
  • Welcome to Stack Overflow. Please read the [How to ask](https://stackoverflow.com/help/how-to-ask) section in help. Your question should contain the code directly, not in an linked image. – Nikolaus Feb 01 '19 at 06:01
  • also, you should note, that StackOverflow is _not_ a free code-writing service – vasily.sib Feb 01 '19 at 06:02
  • I don't think you can just maximise some other process' window. So you probably have to do something like listen for a windows message in your app and maximise mainwindow if you get it. When you run check if there's a previous instance running https://stackoverflow.com/questions/6392031/how-to-check-if-another-instance-of-the-application-is-running send windows message https://stackoverflow.com/questions/41142734/send-window-message-to-wpf-application-from-another-wpf-application – Andy Feb 01 '19 at 11:47
  • @vasily.sib "а где деньги, Зин"? – Zam Feb 02 '19 at 05:13

1 Answers1

0

if you mean your app runs first , and a window of its has been opened , if re-run the app by shortcut , you want the preview one shows again ? if so , just monitors the processes ,if there is a new process and it's the same as your app ,then show your window again. and int the app code ,you should use Mutex

goldii
  • 242
  • 2
  • 18
  • there is an article , you can find answer there http://derpturkey.com/c-cross-process-synchronization/ – goldii Feb 01 '19 at 06:31