> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project を閉じるとき

> FlexiCapture の確認ダイアログが表示される前に実行される On Closing Project イベントを使用すると、Project を閉じる処理に割り込み、メイン ウィンドウを開いたままにできます。

<div id="when-it-is-launched">
  ## 起動時
</div>

このスクリプトは、Project が閉じられる際、確認ダイアログが表示される前に起動されます。続行する前にユーザーによる確認が必要な場合は、確認ダイアログが表示されます。

* **CanClose.Value** プロパティが **false** に設定されている場合、メインウィンドウは開いたままになります。
* **CanClose.Value** プロパティが **true** に設定されている場合、メインウィンドウは閉じられます。

既定では、**CanClose** Parameter の値は **true** です。

<div id="parameters">
  ## パラメーター
</div>

| **Name** | **型**                                                               | **アクセス**  | **Description**         |
| -------- | ------------------------------------------------------------------- | --------- | ----------------------- |
| CanClose | [IBoolean](/ja/flexi-capture/appendix/scripts-shell/iboolean)       | 読み取り/書き込み | メイン ウィンドウを閉じるかどうかを指定します |
| Context  | [IMainWindow](/ja/flexi-capture/appendix/scripts-shell/imainwindow) | 読み取り/書き込み | メイン ウィンドウ               |
