简体   繁体   中英

WPF Application not opening when clicking on the Desktop Icon

I am developing a Wpf application. On installing my application, shortcut icons are created in the desktop and the program menu.

When i click the desktop icon for the time, my application opens. Now i minimize my application in the tray/task bar. On clicking my desktop icon, my application is not maximized. It still minimized in the tray/task bar. For ex, you can take a look at Skype, adobe reader etc..

Requirement - where ever the application icon is present in the PC such as desktop or program menu or etc., my application should be maximized when the user clicks the shortcut icon.

A desktop link will open a new application every time you click on it. If you want your application to open only once and change position/size of the original one once you start a new one, you will have to do this yourself:

Once you application starts, check if another version is already running. Send your running application a message. End itself. If there was no other application started, run normally and liste for the message. On arrival of the message, check if minized and if so, maximize (or change size/position to whatever you need).

Try to implement it and if you have a very specific problem with any of the steps, come to SO and ask a very specific question about it :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM