F
F
FilayVasia2016-03-17 09:33:00
C++ / C#
FilayVasia, 2016-03-17 09:33:00

How to minimize forms to tray and expand if calculations are running?

Good afternoon! Can you please tell me how to deploy the program from the tray while the function is running? С#. Or launch the tray context menu while the function is running.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2016-03-17
@FilayVasia

By code..

trayMenu = new ContextMenu();
var items = trayMenu.MenuItems;
items.Add("Open", OnOpenMainWindow);
items.Add("-");
items.Add("Quit", OnQuitApplication);

private void OnOpenMainWindow(object sender, EventArgs e)
{
     Visible = true;
     ShowInTaskbar = true;
}

A long-running function must be moved to a separate thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question