0

I am doing a check-in check-out system for equipment and chemical item. Firstly, I design check-in/checkout only for equipment. Everything works fine. When I click checkout button, a message box will pop out showing the item is checked out.

Then I add in chemical, which the equipment list and chemical list display on datagridview in different tab page (Using tab control). 1) When I select the equipment list and click the checkout button, a message box will pop out. 2) when I select the chemical list and click the checkout button, a message box will not pop out and the current window is unclickable. Until I use other windows to cover the application and click the application again, then I can see the pop-out message box. After I close the pop-out message box, all the function works well.

The code for message box pop out:

 MessageBox.Show("Item successfully checked out.", "Success");
 DialogResult = DialogResult.OK;
 Close();

EDIT

I found out that the datagridview for the chemical list is somehow refreshing all the data inside although no code is called to refresh the dataview.

Ah Tan
  • 59
  • 6
  • Im not sure if I understand this correctly, but if you wan't to have the dialog on top all the time and wan't to need the user interact with it, have a look at [MikeDub's Answer on SA](https://stackoverflow.com/questions/1220882/keep-messagebox-show-on-top-of-other-application-using-c-sharp) – Cataklysim May 28 '19 at 06:29
  • I found out the problem, the problem is I am using rowprepaint events, that why my message box cannot pop out. – Ah Tan May 30 '19 at 01:37

1 Answers1

0

Some other events are running cause the window did not pop out immediately. The problem I am facing is rowprepaint events. It causes the events always running and the window still focuses and activated. That why the new window pop out did not show up.

Ah Tan
  • 59
  • 6