What is the event that occurs when a user clicks an icon of application running on taskbar?
c#
Solution
You can use the from Activated event.
public Form1()
{
InitializeComponent();
this.Activated += Form1_Activated;
}
private void Form1_Activated(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
//TODO: take required action here
}
}
P.S.:I am assuming that you are looking a solution for winform application.
Problem
Is there any event occurred when I click on an icon of an application that is running and is minimized on taskbar? I want to call my method when the icon is clicked. The method is coded into the app's resource. Please view picture to get more information: