Environment.UserInteractive プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)


IIS のように、ユーザー インターフェイスを表示せずに動作する Windows のプロセスやサービスの場合、UserInteractive プロパティは、false を返します。このプロパティが false の場合は、ユーザーが対話するためのグラフィカル ユーザー インターフェイスが存在しないため、モーダル ダイアログやメッセージ ボックスは表示しないでください。

現在のプロセスがユーザー対話モードで動作しているかどうかを調べるためのコード例を次に示します。
' Sample for the Environment.UserInteractive property Imports System Class Sample Public Shared Sub Main() Console.WriteLine() Console.WriteLine("UserInteractive: {0}", Environment.UserInteractive) End Sub 'Main End Class 'Sample ' 'This example produces the following results: ' 'UserInteractive: True '
// Sample for the Environment.UserInteractive property using System; class Sample { public static void Main() { Console.WriteLine(); Console.WriteLine("UserInteractive: {0}", Environment.UserInteractive); } } /* This example produces the following results: UserInteractive: True */
// Sample for the Environment::UserInteractive property using namespace System; int main() { Console::WriteLine(); Console::WriteLine( "UserInteractive: {0}", Environment::UserInteractive ); } /* This example produces the following results: UserInteractive: True */
// Sample for the Environment.UserInteractive property import System.*; class Sample { public static void main(String[] args) { Console.WriteLine(); Console.WriteLine("UserInteractive: {0}", System.Convert.ToString(Environment.get_UserInteractive())); } //main } //Sample /* This example produces the following results: UserInteractive: True */

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からEnvironment.UserInteractive プロパティを検索する場合は、下記のリンクをクリックしてください。

- Environment.UserInteractive プロパティのページへのリンク