本文整理汇总了VB.NET中System.Windows.Forms.Control.BeginInvoke方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Control.BeginInvoke方法的具体用法?VB.NET Control.BeginInvoke怎么用?VB.NET Control.BeginInvoke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了Control.BeginInvoke方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: InvokeDelegate
Delegate Sub InvokeDelegate()
Private Sub Invoke_Click(sender As Object, e As EventArgs)
myTextBox.BeginInvoke(New InvokeDelegate(AddressOf InvokeMethod))
End Sub
Public Sub InvokeMethod()
myTextBox.Text = "Executed the given delegate"
End Sub
示例2: MyDelegate
Delegate Sub MyDelegate(myControl As Label, myArg2 As String)
Private Sub Button_Click(sender As Object, e As EventArgs)
Dim myArray(1) As Object
myArray(0) = New Label()
myArray(1) = "Enter a Value"
myTextBox.BeginInvoke(New MyDelegate(AddressOf DelegateMethod), myArray)
End Sub
Public Sub DelegateMethod(myControl As Label, myCaption As String)
myControl.Location = New Point(16, 16)
myControl.Size = New Size(80, 25)
myControl.Text = myCaption
Me.Controls.Add(myControl)
End Sub