syncfusion-winforms-splash-panel について
syncfusion-winforms-splash-panel は、Syncfusion の SplashPanel を使う Windows Forms 開発者向けのスキルです。アニメーション、時間指定の終了、子コントロール、柔軟な配置に対応した起動画面や通知ウィンドウを解説します。モーダル・モードレス表示も扱います。
主な機能
- 01スライド、フェード、マーキーアニメーション
- 02画面の隅や任意位置への配置
- 03時間指定または手動での終了
- 04Windows Forms の子コントロール
- 05表示・終了時のライフサイクルイベント
活用シーン
- 01アプリ起動時のブランド情報表示
- 02長時間処理中の進捗表示
- 03自動で閉じる通知ポップアップ
- 04モーダルの情報・読み込みウィンドウ
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ syncfusion/ winforms-ui-components-skills --skill syncfusion-winforms-splash-panelインストール後、Claude Code で/syncfusion-winforms-splash-panelを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
references/animation-appearance.mddisplay-methods.mdevents.mdgetting-started.mdslide-transitions.md詳細
Windows Forms スプラッシュパネル(SplashPanel)
Syncfusion Windows Forms SplashPanel コントロールを使用すると、アプリケーションの起動時に表示するカスタムスプラッシュ画面や、目立ちにくい通知ウィンドウを作成できます。アニメーション、子コントロール、時間指定の自動終了、柔軟な位置指定に対応しています。
このスキルを使用する場面
次のような場合に、このスキルを使用してください。
- スプラッシュ画面を表示する:アプリケーションの起動時や読み込み中
- 進行状況やブランディング情報を表示する:初期化中
- 通知ポップアップを作成する:MSN Messenger やメールの通知のようなもの
- 読み込みインジケーターを実装する:カスタムコンテンツやアニメーションを使用
- 時間指定のメッセージを表示する:指定した時間が経過すると自動的に閉じる
- モーダルダイアログを表示する:カスタムのスプラッシュコンテンツを使用
- アニメーション付きの切り替えを追加する:スプラッシュウィンドウにスライド、フェード、マーキーを適用
- スプラッシュウィンドウを配置する:特定のデスクトップ位置(中央、隅、システムトレイ領域、カスタム)に配置
- 子コントロールを含める:スプラッシュ画面にボタン、ラベル、画像を配置
- スプラッシュのライフサイクルイベントを処理する:表示前、表示時、終了時、終了後
コンポーネントの概要
主な機能:
- アニメーションスタイル: スライド(水平/垂直/方向指定)、フェード、マーキー
- デスクトップ上の配置: 中央、SystemTray、隅(LeftTop、LeftBottom、RightTop、RightBottom)、カスタム
- 表示方法: ShowSplash(モードレス)、ShowDialogSplash(モーダル)、HideSplash
- 自動終了タイマー: 間隔を設定、または手動で制御(自動終了しない場合は -1)
- 子コントロール: 任意の Windows Forms コントロールをスプラッシュパネルに追加
- 外観: グラデーション背景、画像、境界線、透明度
- 動作: AllowMove、AllowResize、CloseOnClick オプション
- イベント: BeforeSplash、SplashDisplayed、SplashClosing、SplashClosed、マウスイベント
ドキュメントとナビゲーションガイド
はじめに
📄 参照: references/getting-started.md
次のような場合は、このリファレンスを参照してください。
- NuGet 経由で SplashPanel をインストールする、またはデザイナーで設定する
- Windows Forms プロジェクトに SplashPanel を追加する
- SplashPanel インスタンスをプログラムで作成する
- スプラッシュパネルに子コントロールを追加する
- 基本的な表示に ShowSplash() メソッドを呼び出す
- アセンブリの要件とデプロイについて確認する
表示方法
📄 参照: references/display-methods.md
次のような場合は、このリファレンスを参照してください。
- ShowSplash() メソッドとパラメーターを使用してスプラッシュパネルを表示する
- HideSplash() メソッドを使用してスプラッシュパネルを非表示にする
- ShowDialogSplash() を使用してモーダルダイアログとして表示する
- IsShowing() を使用して、スプラッシュが現在表示されているか確認する
- 自動終了時間を TimerInterval で設定する
- スプラッシュの位置とオーナーフォームを設定する
- カスタムアイコン/テキストを指定して、タスクバーにスプラッシュを表示する
アニメーションと外観
📄 参照: references/animation-appearance.md
次のような場合は、このリファレンスを参照してください。
- アニメーションを有効にして速度を設定する
- SlideStyle(Horizontal、Vertical、FadeIn など)を設定する
- スプラッシュを最前面のウィンドウとして表示する
- グラデーションや画像を使って背景をカスタマイズする
- 境界線のスタイルと透明度を設定する
- デスクトップ上の配置(中央、SystemTray、隅)を設定する
- 動作オプション(AllowMove、AllowResize、CloseOnClick)を有効にする
- マウスがスプラッシュの上にある間、自動終了を一時停止する
スライドによる切り替え
📄 参照: references/slide-transitions.md
次のような場合は、このリファレンスを参照してください。
- AnimationDirection(Default、LeftToRight、RightToLeft)を設定する
- 画面上を移動するマーキー切り替えを実装する
- MarqueeDirection(LeftToRight、RightToLeft、TopToBottom、BottomToTop)を設定する
- スライドによる切り替えとデスクトップ上の配置を組み合わせる
- 高度なアニメーション効果を作成する
イベント
📄 参照: references/events.md
次の操作が必要な場合に、このリファレンスを参照してください。
- BeforeSplash イベントを処理する(スプラッシュ画面の表示をキャンセル)
- SplashDisplayed イベントに応答する
- SplashClosing イベントを処理する(終了をキャンセル)
- SplashClosed イベントに応答する(終了タイプを取得)
- スプラッシュ画面上でのマウスの進入/退出イベントを処理する
- スプラッシュ画面のライフサイクル中にカスタムロジックを実装する
クイックスタート
基本的なスプラッシュ画面
using Syncfusion.Windows.Forms.Tools;
// Create splash panel
SplashPanel splashPanel = new SplashPanel();
splashPanel.Size = new Size(400, 300);
splashPanel.DesktopAlignment = SplashAlignment.Center;
splashPanel.TimerInterval = 3000; // Show for 3 seconds
splashPanel.ShowAnimation = true;
splashPanel.SlideStyle = SlideStyle.FadeIn;
// Add to form
this.Controls.Add(splashPanel);
// Show splash
splashPanel.ShowSplash();
VB.NET:
Imports Syncfusion.Windows.Forms.Tools
' Create splash panel
Dim splashPanel As New SplashPanel()
splashPanel.Size = New Size(400, 300)
splashPanel.DesktopAlignment = SplashAlignment.Center
splashPanel.TimerInterval = 3000 ' Show for 3 seconds
splashPanel.ShowAnimation = True
splashPanel.SlideStyle = SlideStyle.FadeIn
' Add to form
Me.Controls.Add(splashPanel)
' Show splash
splashPanel.ShowSplash()
一般的なパターン
パターン 1:ブランド表示付きの起動スプラッシュ画面
// Application startup splash
SplashPanel startupSplash = new SplashPanel();
startupSplash.Size = new Size(500, 350);
startupSplash.BackgroundImage = Image.FromFile("splash_image.png");
startupSplash.DesktopAlignment = SplashAlignment.Center;
startupSplash.TimerInterval = 5000;
startupSplash.ShowAnimation = true;
startupSplash.AnimationSpeed = 20;
// Add label with version info
Label versionLabel = new Label();
versionLabel.Text = "Version 2.0";
versionLabel.Location = new Point(20, 300);
versionLabel.AutoSize = true;
startupSplash.Controls.Add(versionLabel);
this.Controls.Add(startupSplash);
startupSplash.ShowSplash();
パターン 2:通知スタイルのポップアップ
// Non-obtrusive notification (like MSN Messenger)
SplashPanel notificationPanel = new SplashPanel();
notificationPanel.Size = new Size(300, 100);
notificationPanel.DesktopAlignment = SplashAlignment.RightBottom;
notificationPanel.SlideStyle = SlideStyle.BottomToTop;
notificationPanel.AnimationDirection = AnimationDirection.Default;
notificationPanel.TimerInterval = 5000;
notificationPanel.ShowAnimation = true;
notificationPanel.CloseOnClick = true;
notificationPanel.SuspendAutoCloseWhenMouseOver = true;
// Add notification content
Label messageLabel = new Label();
messageLabel.Text = "New message received!";
messageLabel.Location = new Point(10, 40);
notificationPanel.Controls.Add(messageLabel);
this.Controls.Add(notificationPanel);
notificationPanel.ShowSplash();
パターン 3:モーダル読み込みダイアログ
// Modal splash dialog that blocks interaction
SplashPanel modalSplash = new SplashPanel();
modalSplash.Size = new Size(400, 200);
modalSplash.TimerInterval = -1; // No auto-close
modalSplash.DesktopAlignment = SplashAlignment.Center;
// Add progress indicator
Label loadingLabel = new Label();
loadingLabel.Text = "Loading, please wait...";
loadingLabel.Location = new Point(120, 90);
loadingLabel.AutoSize = true;
modalSplash.Controls.Add(loadingLabel);
this.Controls.Add(modalSplash);
// Show as modal dialog (blocks until closed)
modalSplash.ShowDialogSplash(this);
パターン 4:グラデーション付きのアニメーションスプラッシュ画面
// Splash with gradient background and animation
SplashPanel animatedSplash = new SplashPanel();
animatedSplash.Size = new Size(450, 300);
animatedSplash.BackgroundColor = new BrushInfo(
GradientStyle.Vertical,
Color.DarkBlue,
Color.LightBlue);
animatedSplash.DesktopAlignment = SplashAlignment.Center;
animatedSplash.SlideStyle = SlideStyle.Horizontal;
animatedSplash.ShowAnimation = true;
animatedSplash.AnimationSpeed = 30;
animatedSplash.TimerInterval = 4000;
animatedSplash.ShowAsTopMost = true;
this.Controls.Add(animatedSplash);
animatedSplash.ShowSplash();
パターン 5:位置をカスタマイズしたスプラッシュ画面
// Splash at custom screen location
SplashPanel customSplash = new SplashPanel();
customSplash.Size = new Size(350, 250);
customSplash.DesktopAlignment = SplashAlignment.Custom;
customSplash.TimerInterval = 3000;
// Show at mouse position
Point mousePos = Control.MousePosition;
customSplash.ShowSplash(mousePos, this, false);
パターン 6:ライフサイクルイベント付きのスプラッシュ画面
// Splash with event handlers
SplashPanel eventSplash = new SplashPanel();
eventSplash.Size = new Size(400, 250);
eventSplash.DesktopAlignment = SplashAlignment.Center;
eventSplash.TimerInterval = 5000;
// Subscribe to events
eventSplash.BeforeSplash += (s, e) => {
Console.WriteLine("About to show splash");
};
eventSplash.SplashDisplayed += (s, e) => {
Console.WriteLine("Splash is now visible");
};
eventSplash.SplashClosing += (s, e) => {
Console.WriteLine("Splash is closing");
// e.Cancel = true; // Uncomment to prevent closing
};
eventSplash.SplashClosed += (s, e) => {
Console.WriteLine($"Splash closed: {e.SplashCloseType}");
};
this.Controls.Add(eventSplash);
eventSplash.ShowSplash();
主なプロパティ
| プロパティ | 型 | 説明 |
|---|---|---|
TimerInterval | int | スプラッシュ画面を表示する時間(ミリ秒単位。自動終了しない場合は -1) |
DesktopAlignment | SplashAlignment | デスクトップ上の位置(中央、システムトレイ、各隅、カスタム) |
SlideStyle | SlideStyle | アニメーションスタイル(Horizontal、Vertical、FadeIn など) |
AnimationSpeed | int | アニメーション遷移の速度(値が大きいほど高速) |
ShowAnimation | bool | 表示時のアニメーションを有効/無効にします |
ShowAsTopMost | bool | スプラッシュ画面を最前面のウィンドウとして表示します |
BackgroundColor | BrushInfo | グラデーションまたは単色の背景色 |
BackgroundImage | Image | スプラッシュ画面の背景画像 |
AllowMove | bool | 実行時にユーザーがスプラッシュ画面を移動できるようにします |
AllowResize | bool | 実行時にユーザーがスプラッシュ画面のサイズを変更できるようにします |
CloseOnClick | bool | ユーザーがスプラッシュ画面をクリックしたときに閉じます |
SuspendAutoCloseWhenMouseOver | bool | マウスがスプラッシュ画面上にある間、自動終了タイマーを一時停止します |
AnimationDirection | AnimationDirection | スライドアニメーションの方向 |
MarqueeDirection | MarqueeDirection | マーキー遷移の方向 |
BorderStyle | Border3DStyle | スプラッシュ画面の 3D 枠線スタイル |
TransparentColor | Color | 背景の透明色 |
ShowInTaskbar | bool | スプラッシュ画面を Windows タスクバーに表示します |
SlideStyle | SlideStyle | アニメーションスタイル。値には Slide(基本的なスライド遷移)、Horizontal、Vertical、FadeIn、Marquee(連続するマーキー遷移)があります。 |
主なメソッド
| メソッド | 説明 |
|---|---|
ShowSplash() | スプラッシュパネルを表示します |
ShowSplash(Point, Form, bool) | 所有フォームを指定して、特定の位置に表示します |
ShowDialogSplash(Form) | モーダルダイアログとして表示します |
ShowDialogSplash(Point, Form) | 特定の位置にモーダルダイアログとして表示します |
HideSplash() | スプラッシュパネルを非表示にします |
IsShowing() | スプラッシュ画面が現在表示されているかを確認します |
SuspendAutoCloseMode() | 自動終了タイマーを一時停止します |
RestoreAutoCloseMode() | 自動終了タイマーを再開します |
主なイベント
| イベント | EventArgs 型 | 説明 |
|---|---|---|
BeforeSplash | CancelEventArgs | スプラッシュ画面の表示前に発生します。キャンセルできます。 |
SplashDisplayed | EventArgs | スプラッシュパネルが表示された後に発生します。 |
SplashClosing | CancelEventArgs | スプラッシュ画面が閉じる前に発生します。キャンセルできます。 |
SplashClosed | SplashClosedEventArgs | スプラッシュ画面が閉じた後に発生します。終了タイプが提供されます。 |
SplashMouseEnter | EventArgs | マウスがスプラッシュパネルに入ったときに発生します。 |
SplashMouseLeave | EventArgs | マウスがスプラッシュパネルから出たときに発生します。 |
一般的な使用例
使用例 1:アプリケーションの起動画面
アプリケーションの初期化中に、ブランド情報とバージョン情報を表示します。
使用例 2:読み込みインジケーター
時間のかかる処理中に、進捗情報を含むスプラッシュパネルを表示します。
使用例 3:通知ポップアップ
目立ちすぎないメッセージ(新着メール、更新など)を表示し、自動終了するか、クリックで閉じます。
ユースケース 4:概要/情報ダイアログ
アプリケーション情報をモーダルのスプラッシュダイアログとして表示します。
ユースケース 5:カスタムメッセージウィンドウ
テーマに合わせたメッセージウィンドウを、カスタムコントロールとアニメーションで作成します。
ベストプラクティス
- 適切な TimerInterval を設定する:起動時のスプラッシュには 2000~5000ms、通知には 3000~8000ms を使用します
- ShowAsTopMost を有効にする:起動時にスプラッシュがほかのウィンドウより前面に表示されるようにします
- 通知には CloseOnClick を使用する:ユーザーが通知スタイルのポップアップを閉じられるようにします
- BeforeSplash イベントを処理する:データを初期化するか、条件に応じて表示をキャンセルします
- 適切なアニメーションを選択する:控えめな演出には FadeIn、動きのある演出には Slide、注意を引く演出には Marquee を使用します
- 子コントロールを慎重に追加する:コントロールが表示され、スプラッシュの範囲内に適切に配置されるようにします
- さまざまな配置をテストする:異なる画面解像度でもスプラッシュが正しく表示されることを確認します
- 適切に破棄する:フォームを閉じるときにスプラッシュパネルが適切に破棄されるようにします