作成日: 2025/04/02 最終更新日: 2025/04/02
文書種別
使用方法
詳細
検索ダイアログで検索された文字列を取得するには、検索フォームが閉じるときに発生するSearchDialogClosingイベント内で、SearchStringsプロパティを使用することで取得できます。
以下にサンプルコードを紹介します。
◎サンプルコード(VB)
Private Sub FpSpread1_SearchDialogClosing(sender As Object, e As CancelEventArgs) Handles FpSpread1.SearchDialogClosing
' 検索文字列の確認
Dim check As String() = FpSpread1.SearchDialog.SearchStrings
For Each s As String In check
Console.WriteLine(s)
Next
End Sub
◎サンプルコード(C#)
private void FpSpread1_SearchDialogClosing(object sender, CancelEventArgs e)
{
// 検索文字列の確認
var check = fpSpread1.SearchDialog.SearchStrings;
foreach(string s in check)
{
Console.WriteLine(s);
}
}