本文介绍了这段代码是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Private Sub lvinventory_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lvInventory.MouseDoubleClick
CurrentItem = lvInventory.GetItemAt(e.X, e.Y)
If CurrentItem Is Nothing Then Exit Sub
CurrentSB = CurrentItem.GetSubItemAt(e.X, e.Y)
Dim iSubIndex As Integer = CurrentItem.SubItems.IndexOf(CurrentSB)
Select Case iSubIndex
Case 12
Case Else
Exit Sub
End Select
If iSubIndex = 0 Then
CurrentItem.BeginEdit()
Exit Sub
End If
Dim lLeft = CurrentSB.Bounds.Left + 2
Dim lWidth As Integer = CurrentSB.Bounds.Width
With TextBox1
.SetBounds(lLeft + lvInventory.Left, CurrentSB.Bounds.Top + _
lvInventory.Top, lWidth, CurrentSB.Bounds.Height)
.Text = CurrentSB.Text
.Show()
.Focus()
End With
End Sub
推荐答案
这篇关于这段代码是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!