Foxtable(狐表)用户栏目专家坐堂 → 无法将类型为“Foxtable.WinForm.Label”的对象强制转换为类型“Foxtable.WinForm.TextBox”


  共有2075人关注过本帖树形打印复制链接

主题:无法将类型为“Foxtable.WinForm.Label”的对象强制转换为类型“Foxtable.WinForm.TextBox”

帅哥哟,离线,有人找我吗?
gaolei
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:69 积分:618 威望:0 精华:0 注册:2017/11/2 13:49:00
无法将类型为“Foxtable.WinForm.Label”的对象强制转换为类型“Foxtable.WinForm.TextBox”  发帖心情 Post By:2019/4/27 18:41:00 [只看该作者]

Dim b1 As WinForm.TextBox = e.Form.Controls("税额1")
Dim b2 As WinForm.TextBox = e.Form.Controls("税额2")
Dim b3 As WinForm.TextBox = e.Form.Controls("税额3")
Dim b4 As WinForm.TextBox = e.Form.Controls("税额4")
Dim b5 As WinForm.TextBox = e.Form.Controls("税率01")
Dim b6 As WinForm.TextBox = e.Form.Controls("税率02")
Dim b7 As WinForm.TextBox = e.Form.Controls("税率03")
Dim b8 As WinForm.TextBox = e.Form.Controls("税率04")
Dim c1 As String = b1.value
Dim c2 As String = b2.value
Dim c3 As String = b3.value
Dim c4 As String = b4.value
Dim c5 As String = b5.value
Dim c6 As String = b6.value
Dim c7 As String = b7.value
Dim c8 As String = b8.value
s2=val(c1)
s3=val(c2)
s4=val(c3)
s5=val(c4)
s6=val(c5)
s7=val(c6)
s8=val(c7)
s9=val(c8)
Dim aa() As Single ={s2,s3,s4,s5}
Dim bb() As Single ={s6,s7,s8,s9}
Dim f As Single
For i As Integer = 0 To 3
   If bb(i) <> 0
     f =f + aa(i)/bb(i)*(1+bb(i))
   End If
NEXT
老师请教一下,这段代码老显示 无法将类型为“Foxtable.WinForm.Label”的对象强制转换为类型“Foxtable.WinForm.TextBox”。这个是为啥,我的代码里面明明没有label类型的窗口啊,打扰老师帮忙指点一下

 回到顶部
帅哥哟,离线,有人找我吗?
gaolei
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:69 积分:618 威望:0 精华:0 注册:2017/11/2 13:49:00
  发帖心情 Post By:2019/4/27 18:54:00 [只看该作者]

老师,我找到原因了,不是代码的原因,代码没问题,打扰啦

 回到顶部