如何Lable Drag&使用鼠标放在vb.net表单上 [英] How to Lable Drag & Drop on vb.net form using mouse

查看:121
本文介绍了如何Lable Drag&使用鼠标放在vb.net表单上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI



任何人都可以帮我设计如何使用鼠标设计表格拖放控制



请发布代码



提前感谢您对我的请求产生影响。



问候

Shyam

解决方案

该应用程序的总体目标是什么?

它是否需要是你拖动的实际标签控件,

还是可以在一些画布中简单地拖动一些文字?



如果您愿意使用第三方.NET组件,我认为MetaDraw .NET Winforms控件可能对您有所帮助。 MetaDraw在您的表单上看起来像一个可滚动的可缩放图片框,但它允许您组合多个元素的图像 - 例如多个文本对象(标签)。您可以在MetaDraw中添加一些文本对象(以及形状和图像),也可以允许用户自己添加文本。然后,您可以允许他选择并抓取任何文本对象并移动它。完成后,您可以读取文本对象的位置。您还可以打印整体布局,并保存。保存时,您可以保存为标准图像格式,或者保存为允许您重新加载并继续拖动文本对象的格式。



作为示例请参阅使用MetaDraw创建的以下网页 -

http: //www.bennet-tec.com/btproducts/MetaDraw/WebSamples/Drawing/md3_demo.htm [ ^ ]



因为这个网页是用OCX版本完成的MetaDraw您应该只使用IE浏览此网页。 (对于您的应用程序,您将使用MetaDraw .NET版本)

在此网页中,您可以直接在浏览器中对此进行测试。点击文本按钮,在MetaDraw中单击并添加一些文本,然后点击选择按钮,然后单击并拖动文本。



当然,这个项目可以使用MetaDraw的.NET版本作为VB.NET Winforms项目完成。 VB.NET代码非常简单。如果您查看此网页的html / vbscript源代码,VB.NET代码几乎完全相同,当然您可以根据需要自定义。



我希望这是有用的

请注意 - 我的公司是MetaDraw的发布者

所以这不完全没有偏见 - 我认为这会满足

你的需求真的很快捷,但我希望你知道我从前面来的地方。



Jeff

Bennet-Tec信息系统



**请包括任何回复的此消息的副本。


HI

Anybody can help me how to design form lable drag & drop control using mouse

Please post the code

Advance Thanks for going to taken effects on my request.

regards
Shyam

解决方案

What is the overall goal of the application ?
Does it need to be an actual label control you are dragging,
or is it ok to simply drag some text around within some canvas ?

If you are open to using a 3rd party .NET component, I think the MetaDraw .NET Winforms control may be helpful to you. MetaDraw looks like a scrollable zoomable picturebox on your form but it allows you to compose an image of multiple elements - such as multiple text objects ( labels ) . You can add a few text objects ( as well as shapes and images ) within MetaDraw or you can allow the user to add the text himself. You can then allow him to select and grab any text object and move it around. When done you can read off the positions of the text objects. You can also print the overall layout, as well as save this. When saving you can save to either a standard image format, or to a format that allows you to reload and continue to drag the text objects around.

As an example see the following web page that was created using MetaDraw -
http://www.bennet-tec.com/btproducts/MetaDraw/WebSamples/Drawing/md3_demo.htm[^]

Because this web page was done with the OCX version of MetaDraw you should use only IE for viewing this web page. ( For your application you would use the MetaDraw .NET edition )
In this web page you can test this out directly in your browser. Hit the Text button, click in MetaDraw and add some text, then hit the Select button and click and drag the text around.

Of course this same project can be done as a VB.NET Winforms project using the .NET edition of MetaDraw. The VB.NET code is very simple. If you look at the html/vbscript sources for this web page, the VB.NET code would be almost the exact same and of course you can customize this to your needs.

I hope this is helpful
Please note - My company is the publisher of MetaDraw
so this is not entirely unbiased - I do think this will meet
your needs really quick and easy but I want you to know where I''m coming from up front.

Jeff
Bennet-Tec Information Systems

** Please include a copy of this message with any reply.


这篇关于如何Lable Drag&使用鼠标放在vb.net表单上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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