I have a textBox in a datagrid which shows the OID description when a user select a OID from a combobox..But the problem is that my textbox is showing the text only when I click on the textbox..is there any way that make the textbox show text without clicking on it as soon as the user selects an OID.Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged If e.ColumnIndex = 1 Then Dim Row As DataGridViewRow = DataGridView1.Rows(e.RowIndex) Select Case Row.Cells(1).Value Case "1.3.6.1.2.1.1.1.0" : TextBox1.Text = "sysDescr" Case "1.3.6.1.2.1.1.2.0" : TextBox1.Text = "sysObjectID" Case "1.3.6.1.2.1.1.3.0" : TextBox1.Text = "sysUpTime" Case "1.3.6.1.2.1.1.4.0" : TextBox1.Text = "sysContact" Case "1.3.6.1.2.1.1.5.0" : TextBox1.Text = "sysName" Case "1.3.6.1.2.1.1.6.0" : TextBox1.Text = "sysLocation" Case "1.3.6.1.2.1.1.7.0" : TextBox1.Text = "sysServices" End Select End If End Sub 解决方案 这篇关于如何在运行时不单击texbox的情况下在TextBox中显示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-29 17:29