问题描述
我在vs2008中的windows mobile 6中写了一个vb appl
我写了一些代码如下:
lblfld(1)=lbl_field_1
bllfld(2)=lbl_field_2
lblfld_show(1)=Part不。
lblfld_show(2)=客户批号
和lbl_field_1是标签格式
此应用程序运行此语句时,
Panel_Main.Controls(lblfld(y))。Text = lblfld_show(y)
它总是会产生InvalidCastExceptionunhandled错误: -
从字符串lbl_field_1转换为''整数''是无效。
任何人都可以向我提出解决方案。谢谢
I write a vb appl in window mobile 6 in vs2008
I write some code as follow :
lblfld(1) = "lbl_field_1"
bllfld(2) = "lbl_field_2"
lblfld_show(1) = "Part No."
lblfld_show(2) = "Client Lot No."
And "lbl_field_1" is Label in the form
when this app run to this statment,
Panel_Main.Controls(lblfld(y)).Text = lblfld_show(y)
It always incur an InvalidCastExceptionunhandled error as :-
"Conversion from string "lbl_field_1" to type ''Integer'' is not valid."
Can anyone metion a solution to me. Thanks
推荐答案
这篇关于用于将字符串转换为Label时控制错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!