私は3つのフォームを持つwinformアプリケーションを持っています。私は2つのフォームでユーザー入力とwhen user click button my form flickers (i means its like form disappear and appears, and sometimes sends my app to back of other app)
を受け取ります。誰が私のアプリケーションの問題点を教えてくれますか? winformで誰かがこのような奇妙な行動に直面したことはありますか?ボタンクリックイベントでwinform filckersを使用する理由
EDITED
Cursor currentCursor = this.Cursor;
try
{
this.Cursor = Cursors.WaitCursor;
this.btnSave.Enabled = false;
if (isDataModified)
{
if (CheckMandatoryData(mpgUserInfo, ref errorMessage))
{
AppMessageBoxResult appMessageBoxResult =
AppMessageBox.ShowQuestion("Confirmation",
"Do you want to continue?", Environment.NewLine));
if (appMessageBoxResult == AppMessageBoxResult.Yes)
{
if (customerInformation != null)
{
//Assigning value to variable and saving
RefreshData();
}
}
}
else
{
AppMessageBoxResult appMessageBoxResult =
AppMessageBox.ShowQuestion("Confirmation",
"Do you want to continue to save?",
errorMessage, Environment.NewLine));
if (appMessageBoxResult == AppMessageBoxResult.Yes)
{
if (customerInformation != null)
{
//Assigning value to variable and saving
RefreshData();
}
}
errorMessage.Clear();
}
}
}
catch (Exception exception)
{
AppMessageBox.ShowException("Error", exception.Message,
exception.InnerException.Message, exception);
}
finally
{
this.Cursor = currentCursor;
this.btnSave.Enabled = true;
}
AppMessageBox
私たちの拡張MessageBox
であると私たちのカスタムフレームワークの一部です。
にフォーカス/モーダルダイアログの問題を持っていると思うことは、ボタンのコードが...あなたが何かを投稿することができないかのアイデアなしに助けるのは難しいですか? –
ボタンクリックハンドラーを投稿できますか? –
ボタンクリックで実行されているコードを追加しました。 –