Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Show/Hide application

Featured Replies

Hi, I want my user to be able to minimise my application to the system tray, which appears as a Notify Icon with the applications Icon on.

I then want the user to be able to double click the icon to maximise the app again, then immediately after, double click the icon to minimise.

private void ni_DoubleClick(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
Show();
WindowState = FormWindowState.Normal;
}

if (WindowState == FormWindowState.Normal)
{
Hide();
WindowState = FormWindowState.Minimized;
}
}

With this code it performs my operation, but only once, How do you get it to continually loop through this procedure.

Thanks

Tony

Hmm.. I do see a problem with the logic. I see that if your first if statement is true and executes, the 2nd one will too. Because, if minimized set to normal, if normal (yes.. it was just set) set to minimized. To me, once you minimize it, it will never become normal/restored.

My guess would be to use an else instead of another if statement. Eg.. Might work :)

if (WindowState == FormWindowState.Minimized)
{
Show();
WindowState = FormWindowState.Normal;
}
else
{
Hide();
WindowState = FormWindowState.Minimized;
}

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.