close

Silverlight 上的多執行序之一 : DispatcherTimer

VB用法類似 winForm 的 Timer ,
全域使用 要先用事件引發定義 再handle給添加執行動作事件函式

jk 測試ok
'-------------------------------------
Private WithEvents timer1 As System.Windows.Threading.DispatcherTimer = New System.Windows.Threading.DispatcherTimer()

Private Sub TimerAction(ByVal sender As System.Object, ByVal e As EventArgs) Handles timer1.Tick

Static aa As Int16

If aa = 60 Then '記錄N次
timer1.Stop()
aa = 0
button3.Content = "Stop ticking"
End If
captureSourec0.CaptureImageAsync() '啟動非同步截圖
' MessageBox.Show("take snapshot " + aa.ToString)
' MessageBox.Show("AA=" + aa.ToString)
aa = aa + 1
End Sub

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 prague12 的頭像
    prague12

    prague12

    prague12 發表在 痞客邦 留言(0) 人氣()