简体   繁体   中英

C#: How do I repaint my form when it's not focused?

I want to repaint/invalidate/refresh my form so that it updates seamlessly when it's not focused. How can I achieve this? Right now it will only update itself when I give it focus or move my mouse over it etc.

Edit: I tried using a timer that would call this.Invalidate(); every 25millisecond

Maybe Invalidate(); is what you're looking for, it forces the particular control (Whether it be a form or menu etc.) to redraw itself on the next update.

I've never used it myself so i'm curious if it actually works.

http://msdn.microsoft.com/en-us/library/598t492a.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM