2011-07-14 3 views
0

私は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であると私たちのカスタムフレームワークの一部です。

+1

にフォーカス/モーダルダイアログの問題を持っていると思うことは、ボタンのコードが...あなたが何かを投稿することができないかのアイデアなしに助けるのは難しいですか? –

+0

ボタンクリックハンドラーを投稿できますか? –

+0

ボタンクリックで実行されているコードを追加しました。 –

答えて

0

私はあなたがあなたのAppMessageBox

+0

私はフレームワークのdllを持っているので、あなたはそれを確認する方法を教えてくれますか? –

関連する問題