油漆事件 [英] Paint event

查看:80
本文介绍了油漆事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个用户控件,它从

UserControl_Paint事件中执行了很多自己的绘制操作,主要使用的是'

传入的e.Graphics对象油漆事件。它工作得很好。


偶尔,油漆事件不会发生。当用户按下Alt键第一个

时间时,这主要发生在具有许多第三方控件的应用程序

中。第一次按键后问题不会发生。我无法确定

来确定问题的来源。


欢迎任何和所有想法,因为我在最后绳子。


谢谢。

解决方案

" Frank Rizzo" <无** @ none.com>在消息中写道

news:u


************** @ TK2MSFTNGP04.phx.gbl ...

我正在创建一个用户控件,它主要使用
UserControl_Paint事件进行绘制,主要是使用已经传递给Paint事件的e.Graphics对象。它工作得很好。

偶尔,油漆事件不会发生。当用户第一次按下Alt键时,这主要发生在具有许多第三方控件的应用程序中。
第一次按键后问题不会发生。我似乎无法确定问题来自哪里。

欢迎任何和所有的想法,因为我在绳子的尽头。




尝试使用onpaint覆盖。


Michael


Michael C写道:< blockquote class =post_quotes>" Frank Rizzo" <无** @ none.com>在消息中写道
新闻:你


I am creating a User Control that does a lot of it own painting from the
UserControl_Paint event mostly using the e.Graphics object that''s
passed into Paint event. It works pretty good.

Occasionally, the paint event doesn''t fire. This occurs mostly in apps
with many 3rd party controls when the user presses Alt key the first
time. The problem doesn''t occur after the 1st key press. I can''t seem
to nail down where the problem is coming from.

Any and all ideas are welcome, as I am at the end of the rope.

Thanks.

解决方案

"Frank Rizzo" <no**@none.com> wrote in message
news:u


**************@TK2MSFTNGP04.phx.gbl...

I am creating a User Control that does a lot of it own painting from the
UserControl_Paint event mostly using the e.Graphics object that''s passed
into Paint event. It works pretty good.

Occasionally, the paint event doesn''t fire. This occurs mostly in apps
with many 3rd party controls when the user presses Alt key the first time.
The problem doesn''t occur after the 1st key press. I can''t seem to nail
down where the problem is coming from.

Any and all ideas are welcome, as I am at the end of the rope.



Try the onpaint override instead.

Michael


Michael C wrote:

"Frank Rizzo" <no**@none.com> wrote in message
news:u


这篇关于油漆事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆