【发布时间】:2014-08-27 12:20:41
【问题描述】:
我有一个在 Windows CE 平台上运行的紧凑型框架应用程序 [vb.cf]。我有一个用户控件,我多次添加到我的表单中,以在运行时形成一个网格。
我现在正在尝试访问和设置我的用户控件上的属性并使用 ;
Dim mod_prop As ctl_mod_table = CType(Me.pnl_table.Controls("ctr_" & icount), ctl_mod_table)
这会产生以下错误:
Conversion from string "ctr_1" to type integer is not valid???
我得到这个有什么原因吗?
我不想使用循环所有控制程序,因为这很慢。
【问题讨论】:
-
为什么不把你的控件保存在一个列表中,这样你以后就不必再找它了?
标签: vb.net controls compact-framework ctype