WindowsFormsApplicationBase クラス
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)


詳細については、Visual Basic のトピック「My.Application オブジェクト」を参照してください。
My.Application オブジェクトが公開するプロパティは、現在のアプリケーションまたは DLL と関連付けられたデータだけを返します。My.Application を使ってシステム レベルの情報を変更することはできません。
一部のメンバについては、Windows フォーム アプリケーションまたはコンソール アプリケーションでのみ利用できます。

この例では、My.Application.CommandLineArgs プロパティを使用して、アプリケーションのコマンド ライン引数を調べています。/input= で始まる引数が見つかった場合は、その引数の残りの部分が表示されます。
Private Sub ParseCommandLineArgs() Dim inputArgument As String = "/input=" Dim inputName As String = "" For Each s As String In My.Application.CommandLineArgs If s.ToLower.StartsWith(inputArgument) Then inputName = s.Remove(0, inputArgument.Length) End If Next If inputName = "" Then MsgBox("No input name") Else MsgBox("Input name: " & inputName) End If End Sub

Microsoft.VisualBasic.ApplicationServices.ApplicationBase
Microsoft.VisualBasic.ApplicationServices.ConsoleApplicationBase
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase


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


- WindowsFormsApplicationBase クラスのページへのリンク