avatar
User control question:# DotNet - 窗口里的风景
w*w
1
to make a user control with graphics drawing on it. Each time when data changes,
the graphics in the control will also change. anyone has some idea to do such
kind of controls?
System.Drawing.Graphics gr = this.CreateGraphics();
i can draw in this gr, and perhaps double buffering technique also is needed.
but how to do it in .NET?
avatar
b*s
2
I have a naive idea.Once the data chages , it fires an event.Then ...

changes,
such
needed.

【在 w**w 的大作中提到】
: to make a user control with graphics drawing on it. Each time when data changes,
: the graphics in the control will also change. anyone has some idea to do such
: kind of controls?
: System.Drawing.Graphics gr = this.CreateGraphics();
: i can draw in this gr, and perhaps double buffering technique also is needed.
: but how to do it in .NET?

avatar
w*w
3
actually you are right. you have to do something after data change. However,
the problem is how to implement this event or function.

【在 b********s 的大作中提到】
: I have a naive idea.Once the data chages , it fires an event.Then ...
:
: changes,
: such
: needed.

avatar
b*s
4
There are tons of tutorials for event and delegate.Please visit
www.codeproject.com and you will find very nice programming projects. A
straightforward example is as follows:
http://www.codeproject.com/csharp/events.asp?target=event%7Cdelegate

【在 w**w 的大作中提到】
: actually you are right. you have to do something after data change. However,
: the problem is how to implement this event or function.

avatar
w*w
5
my problem is not event or delegate, but it is how to implement double buffering
drawing in .NET, especially for a user-customized control.

【在 b********s 的大作中提到】
: There are tons of tutorials for event and delegate.Please visit
: www.codeproject.com and you will find very nice programming projects. A
: straightforward example is as follows:
: http://www.codeproject.com/csharp/events.asp?target=event%7Cdelegate

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。