本文介绍了从'对象到'字符串'在行“readValue = My.Computer.Registry.GetValue(" HKEY_LOCAL_MACHINE \ SOFTWARE \ARSS"," EPV",Nothing)”的隐式转换“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 私有 Sub PictureBox7_Click( ByVal sender As System。 Object , ByVal e As System.EventArgs) Handles PictureBox7.Click PictureBox7 .Hide() PictureBox6.Hide() PictureBox5.Show() Dim readValue 作为 字符串 readValue = My.Computer.Registry.GetValue( HKEY_LOCAL_MACHINE \ SOFTWARE \ARSS, EPV, Nothing ) 如果 readValue< ;> 然后 Button1 .Hide() ConfigurationMain.TabPages.Remove(TabPage2) ConfigurationMain.TabPages.Remove(TabPage4) Savemain.Hide() Label23.Hide() Login.Show() Else Button1.Show() ConfigurationMain.TabPages.Remove(TabPage2) ConfigurationMain .TabPages.Remove(TabPage4) Login.Hide() Savemain.Show() Label23.Hide() Timer1.Interval = 100 Timer1.Enabled = True 结束 如果 结束 Sub 解决方案 做类似的事情: Dim readValue As String readValue = CStr (My.Computer.Registry.GetValue( HKEY_LOCAL_MACHINE\SOFTWARE\ARSS , EPV, Nothing )) 如果 不 String .IsNullOrEmpty(readValue)然后 ' .... 结束 如果 一条建议,将项目选项'strict'设置为'on - 那么你应该在编译时得到一个错误 Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click PictureBox7.Hide() PictureBox6.Hide() PictureBox5.Show() Dim readValue As String readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ARSS", "EPV", Nothing) If readValue <> "" Then Button1.Hide() ConfigurationMain.TabPages.Remove(TabPage2) ConfigurationMain.TabPages.Remove(TabPage4) Savemain.Hide() Label23.Hide() Login.Show() Else Button1.Show() ConfigurationMain.TabPages.Remove(TabPage2) ConfigurationMain.TabPages.Remove(TabPage4) Login.Hide() Savemain.Show() Label23.Hide() Timer1.Interval = 100 Timer1.Enabled = True End If End Sub 解决方案 Hi, make something like that:Dim readValue As StringreadValue = CStr(My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ARSS", "EPV", Nothing))If Not String.IsNullOrEmpty(readValue) Then '....End IfAnd one advice, set the project option 'strict' to 'on' - then you should get an error at compile time. 这篇关于从'对象到'字符串'在行“readValue = My.Computer.Registry.GetValue(" HKEY_LOCAL_MACHINE \ SOFTWARE \ARSS"," EPV",Nothing)”的隐式转换“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-28 22:38