本文整理汇总了VB.NET中System.Windows.Forms.Control.Capture属性的典型用法代码示例。如果您正苦于以下问题:VB.NET Control.Capture属性的具体用法?VB.NET Control.Capture怎么用?VB.NET Control.Capture使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了Control.Capture属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CType
'This method handles the mouse down event for all the controls on the form. When a control has
'captured the mouse, the control's name will be output on label1.
Private Sub Control_MouseDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown, _
label1.MouseDown, listbox1.MouseDown, listbox2.MouseDown
Dim control As Control = CType(sender, Control)
If (control.Capture) Then
label1.Text = control.Name & " has captured the mouse"
End If
End Sub