EnvironmentPolicy.SuppressSettingEnvironmentVariables() Method
Prevents DevExpress controls from setting environment variables.
Namespace: DevExpress.Data.Utils
Assembly: DevExpress.Data.v24.2.dll
Declaration
Remarks
The following example activates the SuppressSettingEnvironmentVariables
restrictive policy:
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.SuppressSettingEnvironmentVariables();
Application.Run(new Form1());
}
}
}
The EnvironmentPolicy
fires the SettingVariable event when the DevExpress control attempts to set the value of the environment variable from the current process. Handle the SettingVariable
event to spot, analyze, and/or cancel the operation based on a specific condition.
Tip
Read the following topic for additional information: Environment Policy.
See Also