WindowsFormsApplicationBase.OnInitialize 方法

定義

設定主應用程式執行緒的視覺樣式、文字顯示樣式及當前原則(若應用程式使用 Windows 驗證),並初始化啟動畫面(如有定義)。

protected:
 virtual bool OnInitialize(System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ commandLineArgs);
[System.STAThread]
protected virtual bool OnInitialize(System.Collections.ObjectModel.ReadOnlyCollection<string> commandLineArgs);
[<System.STAThread>]
abstract member OnInitialize : System.Collections.ObjectModel.ReadOnlyCollection<string> -> bool
override this.OnInitialize : System.Collections.ObjectModel.ReadOnlyCollection<string> -> bool
Protected Overridable Function OnInitialize (commandLineArgs As ReadOnlyCollection(Of String)) As Boolean

參數

commandLineArgs
ReadOnlyCollection<String>

一個只讀的集合,包含命令列參數作為當前應用程式的字串。

傳回

Boolean A 表示應用程式啟動是否應該繼續。

屬性

備註

根據預設,這個方法會設定主要應用程式執行緒的視覺樣式、文字樣式和目前主體(如果應用程式使用 Windows 驗證),且如果 ShowSplashScreen/nosplash 都未被用作命令列參數,則呼叫 -nosplash

此方法呼叫以下方法:

適用於

另請參閱