本文介绍了覆盖OnPaint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我重写OnPaint并在控件上绘制一个正方形,当我在设计器中预览它时如何显示e.graphics.draw ...?

If I override OnPaint and draw a square on the control, how do I get that e.graphics.draw... to show up when I'm previewing it in the designer?

推荐答案

[
Designer(typeof(ClockControlDesigner ))
]类ClockControl:控件{...}

[ Designer(typeof(ClockControlDesigner)) ] class ClockControl : Control { ... }

这篇关于覆盖OnPaint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 02:00