如何调整大小和移动在运行时创建的控件? [英] How to resize and move controls which is created at runtime?

查看:71
本文介绍了如何调整大小和移动在运行时创建的控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有表格.以这种形式,我创建了没有运行时控件的证书.我想在运行时移动这些控件并调整其大小.

请帮我解决这个问题.
[删除电子邮件以避免垃圾邮件]

Hi everyone,

I have form. In that form, I have created certian no of runtime controls. I want to move and resize these controls at runtime.

Please help me out from this issue.
[Email removed to avoid SPAM]

推荐答案

您可以简单地保留对创建对象的引用.看看下面的链接.我认为这只是您需要的示例源代码.

http://www.freevbcode.com/ShowCode.asp?ID=5977 [ ^ ]

祝您好运!
You can simply keep reference to the created objects. Have a look at the link below. I think it''s just the example source code you need.

http://www.freevbcode.com/ShowCode.asp?ID=5977[^]

Good luck!


在添加它们之前,请先获取表单上已经存在的控件的数量.添加它们时,您知道第一个动态移动的项目在Controls列表中的位置,并从那里进行索引.

Location 属性是您要用来移动它们的东西.
Before adding them, get a count of the controls that are already on the form. When you add them, you know where in the Controls list the first dynamically moved item is, and index from there.

The Location property is what you''re want to use to move them.


这篇关于如何调整大小和移动在运行时创建的控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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