本文介绍了如果标签不可见,如何使标签可见? label.show()和label.visible = true没有给出正确的输出。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Public Sub Receive()
       Dim bytes(100000) As Byte
       Dim bytesRec As Integer
       While True ' Always receiving msg
           bytes = New Byte(100000) {}
           bytesRec = sender.Receive(bytes) 'bytesRec is a integer variable to store received msg number of bytes as integer
           If bytesRec > 0 Then 'if any msg  received then it is >0
               Data = Encoding.ASCII.GetString(bytes, 0, bytesRec)
               ' Controls("Label" & Data).Visible = True
               Controls("Label" & Data).BackColor = Color.Green

               'Dim lbl As Label
               'lbl = Controls("Label" & Data)
               'lbl.BackColor = Color.Green
               ''lbl.Show()
               'lbl.Visible = True

               ExtractData(Data)
               Me.sender.Send(Encoding.ASCII.GetBytes(Data))
           End If
       End While
   End Sub

推荐答案


这篇关于如果标签不可见,如何使标签可见? label.show()和label.visible = true没有给出正确的输出。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 03:06