Back to Devexpress

EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder) Method

corelibraries-devexpress-dot-data-dot-utils-dot-environmentpolicy-dot-suppressreadingspecialfolder-x28-system-dot-environment-dot-specialfolder-x29.md

latest2.7 KB
Original Source

EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder) Method

Prevents DevExpress controls from getting the path to the specified system special folder.

Namespace : DevExpress.Data.Utils

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static void SuppressReadingSpecialFolder(
    Environment.SpecialFolder folder
)
vb
Public Shared Sub SuppressReadingSpecialFolder(
    folder As Environment.SpecialFolder
)

Parameters

NameTypeDescription
folderEnvironment.SpecialFolder

The directory path to a system special folder.

|

Remarks

The following example activates the SuppressReadingSpecialFolder restrictive policy:

csharp
using System;
using System.Windows.Forms;

namespace EnvironmentPolicyDemo {
    internal static class Program {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.Data.Utils.EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder.System);
            Application.Run(new Form1());
        }
    }
}
vb
Imports System
Imports System.Windows.Forms

Namespace EnvironmentPolicyDemo
  Friend Module Program
    ''' <summary>
    ''' The main entry point for the application.
    ''' </summary>
    <STAThread>
    Sub Main()
      Application.EnableVisualStyles()
      Application.SetCompatibleTextRenderingDefault(False)
      DevExpress.Data.Utils.EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder.System)
      Application.Run(New Form1())
    End Sub
  End Module
End Namespace

Tip

Read the following topic for additional information: Environment Policy.

See Also

EnvironmentPolicy Class

EnvironmentPolicy Members

DevExpress.Data.Utils Namespace