WindowsFormsApplicationBase.OnInitialize 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定主應用程式執行緒的視覺樣式、文字顯示樣式及當前原則(若應用程式使用 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。
此方法呼叫以下方法: