vb.netのWindowsアプリケーションでは、アプリケーションを閉じる前に確認する必要があります。私はFormClosing
イベントユーザーがNo
をクリックした場合、私は、フォームの閉鎖を解除するにはどうすればよいユーザー選択によるフォームのキャンセル
If BackgroundWorker1.IsBusy Then
Dim UserSelection As Integer = MsgBox("Do you want Cancel Processing and Exit Application?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Exit Application")
If UserSelection = 6 Then
BackgroundWorker1.CancelAsync()
e.Cancel = True
Else
????
End If
End If
にこのコードを持っていますか?
試しましたe.Cancel = false
試しましたが、機能しませんでした(アプリケーションを終了しました)。
'e.Cancel = True'はフォームの終了を停止します。 – keyboardP
@keyboardPありがとう..私は間違って別の言い方をしている、私のばかげて申し訳ありません... :) – Nalaka526
あなたは大歓迎です! – keyboardP