Main Site Documentation

How to copy a part of the main window


#1

Hi,

I’m using a 800x480 display. The main window contains a background image and some texts and buttons. I’m using a (self made) pop-up window to display a message. In order to hide the pop-up window I’m using Mainwindow.Invalidate() to redraw the mainwindow, but this will take some seconds.

Is it possible to save the area of the main window under the pop-up window before showing it and redraw that later to hide it. This could make hiding a lot quicker.

Peter


#2

You could use the BackImage to draw over where your pop-up was located

myWindow.Graphics.DrawImage(PopupX, PopupY, myWindow.BackImage, PopupX, PopupY, PopupWidth, PopupHeight, 255);
myWindow.Invalidate();