如何使用像对象一样的绘制 [英] How to use any draw like object

查看:94
本文介绍了如何使用像对象一样的绘制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码中有很多图画

i想要像对象一样使用它们(事件,更改位置等等)

是可能的吗?

注意:不会丢失绘制边缘

I have many drawings in my code
i want to use them like objects(Events,change position,...etc)
is that possible?
note: without lose the points of draw edges

推荐答案

是 - 可能。

有两种方法可以做到这一点,但最简单的方法是将它们作为UserControls实现 - 在Paint事件中绘制你需要的东西,你可以拥有你想要提供的任何事件。



请参阅此处: MSDN UserControl [ ^ ]
Yes - probably.
There are a couple of ways to do it, but probably the easiest is to implement them as UserControls - draw what you need in the Paint event, and you can have whatever Events you want to provide.

See here: MSDN UserControl[^]


这篇关于如何使用像对象一样的绘制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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