I created an algorithm for this specific case with your assistance. For clearer understanding, I illustrated it as follows: ![277145-algorithm.png][1] `XAML` (I only inserted the necessary codes): `C#` (owner window): private async void Add_Button_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { await Task.Run(() => { OleDbParameter Parameter = new OleDbParameter(); Parameter.OleDbType = OleDbType.Binary; Parameter.ParameterName = "BookImage"; Dispatcher.Invoke(() => { Parameter.Value = ImageToBytes((BitmapImage)BookImage.Source); }); OleDbCommand OleDbCommandInsert = new OleDbCommand("Insert Into BookInfo(BookName,Authors,Publisher,[ISBN-13],[ISBN-10],Category,PublicationDate,BookLanguage,Length,[Type],Translators,Narrators,DeweyDecimalClassification,UniversalDecimalClassification,LibraryOfCongressClassification,BookImage,Price) Values(@BookName,@Authors,@Publisher,@ISBN13,@ISBN10,@Category,@PublicationDate,@BookLanguage,@Length,@Type,@Translators,@Narrators,@DeweyDecimalClassification,@UniversalDecimalClassification,@LibraryOfCongressClassification,@BookImage,@Price)", OleDbConnect); Dispatcher.Invoke(() => { OleDbCommandInsert.Parameters.AddWithValue("@BookName", BookName_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Authors", Authors_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Publisher", PublicationDate_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@ISBN13", ISBN13_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@ISBN10", ISBN10_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Category", Category_ComboBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@PublicationDate", PublicationDate_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@BookLanguage", Language_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Length", ushort.Parse(Length_TextBox.Text)); OleDbCommandInsert.Parameters.AddWithValue("@Type", Type_ComboBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Translators", Translators_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@Narrators", Narrators_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@DeweyDecimalClassification", DeweyDecimalClassification_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@UniversalDecimalClassification", UniversalDecimalClassification_TextBox.Text); OleDbCommandInsert.Parameters.AddWithValue("@LibraryOfCongressClassification", LibraryOfCongressClassification_TextBox.Text); OleDbCommandInsert.Parameters.Add(Parameter); OleDbCommandInsert.Parameters.AddWithValue("@Price", Price_TextBox.Text); }); OleDbConnect.Open(); OleDbCommandInsert.ExecuteScalar(); OleDbConnect.Close(); Dispatcher.Invoke(() => { MessageWindow MW = new MessageWindow(); MW.Owner = this; MW.Owner.IsEnabled = false; MW.YesButton.Visibility = Visibility.Hidden; MW.NoButton.Visibility = Visibility.Hidden; MW.Image.Source = GetImageFromBytes(System.IO.File.ReadAllBytes(System.Windows.Forms.Application.StartupPath + @"\Images\Check.bin")); switch (App.EnumLanguage) { case AllLanguage.English: MW.MessageTextBlock.Text = "Information added successfully"; MW.OKButton.Content = "OK"; break; default: MW.MessageTextBlock.Text = "اطلاعات با موفقیت اضافه شد"; MW.OKButton.Content = "تایید"; break; } MW.Show(); }); }); } `C#` (message window): private void OKButton_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.Owner.IsEnabled = true; } private void CloseMessageWindow_Completed(object sender, EventArgs e) { Close(); } Result (I set the `Duration` property of the `Animation` to 7 seconds to better understand the result): ![277175-result.gif][2] [1]: /answers/storage/attachments/277145-algorithm.png [2]: /answers/storage/attachments/277175-result.gif