How to refresh the screen so that closed forms virtually disappear

I have several forms that appear during an intensive operation. For example, when a form pops up asking for something from the user and the user clicks OK, the chart form remains on the main screen, even if it is closed. How can I make it so that these graphs completely disappear?

+3
source share
3 answers

I would recommend doing heavy work in the background (e.g. BackgroundWorker), so the GUI thread is not blocked. Thus, the forms will be able to display screen updates during operation.

+4
source

, , , , . /, .

DoEvents(), , , DoEvents - , -, .

+4

You can call the Refresh () method in the form of the main screen, which will cause the graphics to repaint.

+1
source

Source: https://habr.com/ru/post/1750301/


All Articles