-->

This article covers working with alerts in a Xamarin.Mac application. It describes creating and displaying alerts from C# code and responding to user interactions.

Uninstall Microsoft Warning Alert from the system. Instruction for Windows XP and Windows 7. Instruction for Windows 8. Instruction for Windows 10. Instruction for Mac OS. Check browser's shortcut. Remove Microsoft Warning Alert from browser's settings. Instruction for Google Chrome. Instruction for Mozilla Firefox.

When working with C# and .NET in a Xamarin.Mac application, you have access to the same Alerts that a developer working in Objective-C and Xcode does.

An alert is a special type of dialog that appears when a serious problem occurs (such as an error) or as a warning (such as preparing to delete a file). Because an alert is a dialog, it also requires a user response before it can be closed.

  • For the last few days I have been getting a fake virus alert. Looks like it is coming from Microsoft Security. In the address bar is says ( gdivnxogkh.bounceme.net) I have to close out my browser to get rid of it. I have IE10 and Windows 8. Although the popup occurs on Chrome while playing a game, o.
  • Apr 22, 2018  If you see a message like this while on the internet be advised it is a fake virus warning. There also might be a loud voice claiming the computer is infected and instructing you to call the on.

In this article, we'll cover the basics of working with Alerts in a Xamarin.Mac application.

Introduction to Alerts

An alert is a special type of dialog that appears when a serious problem occurs (such as an error) or as a warning (such as preparing to delete a file). Because Alerts disrupt the user since they must be dismissed before the user can continue on with their task, avoid displaying an alert unless it’s absolutely necessary.

Apple suggest the following guidelines:

  • Don't use an alert merely to give users information.
  • Do not display an alert for common, undoable actions. Even if that situation might cause data loss.
  • If a situation is worthy of an alert, avoid using any other UI element or method to display it.
  • The Caution icon should be used sparingly.
  • Describe the alert situation clearly and succinctly in the alert message.
  • The Default Button name should correspond to the action you describe in your alert message.

For more information, see the Alerts section of Apple's OS X Human Interface Guidelines

Anatomy of an Alert

As stated above, alerts should be shown to your application's user when a serious problem occurs or as a warning to potential data loss (such as closing an unsaved file). In Xamarin.Mac, an alert is created in C# code, for example:

The code above displays an alert with the applications icon superimposed on the warning icon, a title, a warning message and a single OK button:

Microsoft

Apple provides several properties that can be used to customize an alert:

  • AlertStyle defines the type of an alert as one of the following:
    • Warning - Used to warn the user a current or impending event that is not critical. This is the default style.
    • Informational - Used to warn the user about a current or impending event. Currently, there is no visible difference between a Warning and a Informational
    • Critical - Used to warn the user about severe consequences of an impending event (such as deleting a file). This type of alert should be used sparingly.
  • MessageText - This is the main message or title of the alert and should quickly define the situation to the user.
  • InformativeText - This is the body of the alert where you should define the situation clearly and present workable options to the user.
  • Icon - Allows a custom icon to be displayed to the user.
  • HelpAnchor & ShowsHelp - Allows the alert to be tied into the application HelpBook and display help for the alert.
  • Buttons - By default, an alert only has the OK button but the Buttons collection allows you to add more choices as needed.
  • ShowsSuppressionButton - If true displays a checkbox that the user can use to suppress the alert for subsequent occurrences of the event that triggered it.
  • AccessoryView - Allows you to attach another subview to the alert to provide extra information, such as adding a Text Field for data entry. If you set a new AccessoryView or modify an existing one, you need to call the Layout() method to adjust the visible layout of the alert.

Displaying an Alert

There are two different ways that an alert can be displayed, Free-Floating or as a Sheet. The following code displays an alert as free-floating:

If this code is run, the following is displayed:

The following code displays the same alert as a Sheet:

If this code is run, the following will be displayed:

Working with Alert Buttons

By default, an Alert displays only the OK button. However, you are not limited to that, you can create extra buttons by appending them to the Buttons collection. The following code creates a free-floating alert with a OK, Cancel and Maybe button:

The very first button added will be the Default Button that will be activated if the user presses the Enter key. The returned value will be an integer representing which button the user pressed. In our case the following values will be returned:

  • OK - 1000.
  • Cancel - 1001.
  • Maybe - 1002.

If we run the code , the following will be displayed:

Here is the code for the same alert as a Sheet:

If this code is run, the following will be displayed:

Important

You should never add more than three buttons to an alert.

Showing the Suppress Button

If the Alert's ShowSuppressButton property is true, the alert displays a checkbox that the user can use to suppress the alert for subsequent occurrences of the event that triggered it. The following code displays a free-floating alert with a suppress button:

If the value of the alert.SuppressionButton.State is NSCellStateValue.On, the user has checked the Suppress checkbox, else they have not.

If the code is run, the following will be displayed:

Here is the code for the same alert as a Sheet:

If this code is run, the following will be displayed:

Adding a Custom SubView

Alerts have an AccessoryView property that can be used to customize the alert further and add things like a Text Field for user input. The following code creates a free-floating alert with an added text input field:

But if I check what daemons are loaded on Terminal, I seethat the Microsoft AU app is still loaded, so I have edited the values in `/Library/LaunchAgents/com.microsoft.update.agent.plist` to disable the daemon. What is microsoft au daemon on my mac

The key lines here are var input = new NSTextField (new CGRect (0, 0, 300, 20)); which creates a new Text Field that we will be adding the alert. alert.AccessoryView = input; which attaches the Text Field to the alert and the call to the Layout() method, which is required to resize the alert to fit in the new subview.

If we run the code, the following will be displayed:

Here is the same alert as a sheet:

If we run this code, the following will be displayed:

Summary

This article has taken a detailed look at working with Alerts in a Xamarin.Mac application. We saw the different types and uses of Alerts, how to create and customize Alerts and how to work with Alerts in C# code.

Related Links

-->

Note

Office 365 ProPlus is being renamed to Microsoft 365 Apps for enterprise. For more information about this change, read this blog post.

Introduction

This step-by-step article describes how to enable or to disable the display of a warning message every time that you click a hyperlink in a 2007 Microsoft Office program or in a Microsoft Office 2010 program.

More Information

Important

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.

In 2007 Office and in Office 2010, when you click a hyperlink or an object that links to an executable file, you receive the following warning message:

This behavior occurs regardless of your security level settings.

Note

Microsoft Warning Alert On Mac Computer

To locate your security level settings, point to Macro on the Tools menu, and then click Security.

Additionally, when you open either TIFF images or Microsoft Document Imaging (MDI) files, you receive the following warning message:

You receive this warning message even when you have already implemented the registry key that this article describes. This warning message comes from the HLINK.dll file when link navigation is handled. You can differentiate the 2007 Office or 2010 Office hyperlink warning message from the HLINK warning message by looking for quotation marks around the file path in the warning message. The 2007 Office or Office 2010 message contains quotation marks. The HLINK message does not contain quotation marks. 2007 Office and Office 2010 try to determine whether the file type itself is unsafe by checking the extension, the progid, the classid, and the MIME type of the document.

How to globally enable or disable hyperlink warnings

To have us enable hyperlink warnings for 2007 Office programs and for Office 2010 programs for you, go to the 'Here's an easy fix' section. If you prefer to enable the setting yourself, go to the 'Let me fix it myself' section.

Here's an easy fix

To fix this problem automatically, download and run 'Microsoft Easy Fix 20189',and then follow the steps in the easy fix wizard.

  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you're not on the computer that has the problem, save the easy fix solution to a flash drive or a CD, and then run it on the computer that has the problem.
Enable hyperlink warnings

Let me fix it myself

To enable or to disable the hyperlink warnings in 2007 Office programs and in Office 2010 programs when an https:// address, a notes:// address, or an ftp:// address is used, you must create a new registry subkey. To do this, follow these steps:

Microsoft Warning Alert On Mac Iphone

  1. Click Start, and then click Run.

  2. In the Open dialog box, type regedit, and then click OK.

    Note

    • You have to modify only one of these registry subkeys. You do not have to modify both.
    • If the Security subkey already exists, go directly to step 6 after you select the Security subkey.
  3. In Registry Editor, locate one of the following registry subkeys for 2007 Office: HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0CommonOr, in Registry Editor, locate one of the following registry subkeys for Office 2010: HKEY_CURRENT_USERSoftwareMicrosoftOffice14.0Common

  4. Click the registry subkey, point to New on the Edit menu, and then click Key.

  5. Type Security, and then press Enter to name the key.

  6. On the Edit menu, point to New, and then click DWORD Value.

  7. Type DisableHyperlinkWarning, and then press Enter to name the entry.

  8. In the right pane, right-click DisableHyperlinkWarning, and then click Modify.

  9. In the Edit DWORD Value dialog box, click Decimal, and then type 1 or 0 under Value data.

    Note

    A value of 0 enables the hyperlink warning message. A value of 1 disables the hyperlink warning message.

  10. Click OK.

  11. Exit Registry Editor.

How to enable or disable hyperlink warnings per protocol

To disable the display of security warnings for a specific protocol, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.

  2. Locate the following registry subkey:

    HKEY_CURRENT_USERSoftwarePoliciesMicrosoftOfficexx.0CommonSecurityTrusted ProtocolsAll Applications

    Note In this subkey, replace 'xx.0' with 12.0 for Outlook 2007 and with 14.0 for Outlook 2010.

  3. Click the All Applications subkey.

  4. On the Edit menu, point to New, and then click Key.

  5. Type the name of the protocol that you want to exclude. For example, to disable the display of a security warning for the 'Notes:' protocol, type Notes:.

    Secure and private email. We believe privacy is a fundamental human right. That's why at Spark, we don’t sell or unlawfully share your personal data with third parties. Spark is free for individual users, yet it makes money by offering Premium plans for teams. Launch Spark for Mac; At the top left of your screen, click on “Spark” “Add Account” Click on the “Exchange” icon from the grid of email service providers; When you see the Sign in with Microsoft screen, enter your Exchange email and password and click Next. Then, click on the blue ‘Allow’ button to grant Spark access to your email account, so you can use your Exchange within Spark. Mac spark email microsoft exchange.

    Note Make sure that you include the colon (:) character.

  6. Press Enter.

  7. Exit Registry Editor.

If you still receive a warning message

After you disable warning messages, you may still receive a warning message from Microsoft Windows. If you continue to receive a warning message after you follow the steps in this article, use one of the following methods to resolve the issue.

Note

Method 1 applies only to Windows XP and to earlier versions of Windows. For Windows Vista and for later versions of Windows, use method 2.

Method 1: Turn off the 'Confirm open after download' option for the file type that you are trying to open

  1. Double-click My Computer.
  2. On the Tools menu, click Folder Options.
  3. On the File Types tab, select the appropriate file name extension (for example, WMV) in the Registered File Types box, and then click Advanced.
  4. Click to clear the Confirm open after download check box, and then click OK.
  5. In the Folder Options dialog box, click Close.

Method 2: Modify the HKEY_CLASSES_ROOTCLSID>EditFlags registry subkey

Use this method if the warning message affects multiple computers.

To disable the warning message, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.

  2. Locate the following registry subkey:

    HKEY_CLASSES_ROOT<CLSID>EditFlags

    For example, if the file name extension is WMV, select HKEY_CLASSES_ROOTWMVFileEditFlags

  3. Click EditFlags, and then click Rename on the Edit menu.

  4. Type OldEditFlags, and then press ENTER.

  5. On the Edit menu, point to New, and then click DWORD value.

  6. Type EditFlags, and then press ENTER.

  7. On the Edit menu, click Modify.

  8. In the Edit DWORD Value dialog box, click Hexadecimal under Base.

  9. Type 10000, and then click OK.

To re-enable the warning message, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.

  2. Locate the following registry subkey:

    HKEY_CLASSES_ROOT<CLSID>EditFlags

  3. Click EditFlags, and then click Modify on the Edit menu.

  4. Type 0, and then click OK.

Note

Even after you follow these steps, you will receive the warning message if you open files in Office 2010 under Protected View.

Did this fix the problem?

Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support.

Coments are closed
Scroll to top