创建可变数量的标签(Visual Basic新手) [英] Create variable amount of labels (Visual Basic newbie)

查看:137
本文介绍了创建可变数量的标签(Visual Basic新手)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试创建一个程序,该程序生成一个具有可变大小的行和列的矩阵。现在减少我想要的无用代码的数量,以便自动生成标签。


我已经尝试创建一系列标签。


以下代码似乎在我调试它时起作用,但标签在运行后没有出现在表单上。它不会停止或崩溃只是执行程序而且就是这样。我需要使用什么代码才能使标签出现在表单上?


或者可能是因为它们只是落在了屏幕上?也许我选择了错误的坐标?

Hi,

I''m trying to create a programme which generates a matrix with variable sized rows and columns. Now to reduce the amount of useless code i want to have it so that the labels are automatically generated.

I''ve tried creating an array of labels.

The following code seems to work when i debug it but the labels do not show up on the form after running. It does not stall or crash it just executes the program and that''s it. What code do i need to make the labels appear on the form?

Or may it be that they just fall of the screen? Maybe i chose the coordinates wrong?.

展开 | 选择 | Wrap | 行号

推荐答案





我正在尝试创建一个程序,该程序生成一个具有可变大小的行和列的矩阵。现在减少我想要的无用代码的数量,以便自动生成标签。


我已经尝试创建一系列标签。


以下代码似乎在我调试它时起作用,但标签在运行后没有出现在表单上。它不会停止或崩溃只是执行程序而且就是这样。我需要使用什么代码才能使标签出现在表单上?


或者可能是因为它们只是落在了屏幕上?也许我选择了错误的坐标?

Hi,

I''m trying to create a programme which generates a matrix with variable sized rows and columns. Now to reduce the amount of useless code i want to have it so that the labels are automatically generated.

I''ve tried creating an array of labels.

The following code seems to work when i debug it but the labels do not show up on the form after running. It does not stall or crash it just executes the program and that''s it. What code do i need to make the labels appear on the form?

Or may it be that they just fall of the screen? Maybe i chose the coordinates wrong?.

展开 | 选择 | Wrap | 行号


谢谢,但是如果所有标签都具有相同的位置,我仍然应该看到最顶端的一个。我正在使用2005版本,​​如果这带来任何额外的信息...
Thanks, but if all the labels have the same position, i should still see the topmost one. I''m working with the 2005 version if this brings any extra info...


如果你试图将标签相对于彼此定位,我认为''属性Top和左或者指的是标签角落的位置。


然后你可以使用lblName(i-1)获取最后一个标签并以这种方式使用它。不过我可能会想到一个不同的版本。如果我,我的道歉。
if you''re trying to position the labels in relation to each other, I think there''s an attribute "Top" and "Left" or something referring to where the corners of the label will be.

Then you can use lblName(i-1) to get the last label and use it that way. I could be thinking of a different version however. If I am, my apologies.


这篇关于创建可变数量的标签(Visual Basic新手)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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