*VFP/SQLLite is Better than MS Access.
SET DEFAULT TO "C:\yourWorkFolder"
nTemp = SYS(3)
USE fpTable SHARED IN 0 ALIAS (nTemp + "FingerPrint")
SELECT nTemp
DIMENSION FFingerNames[BiokeyFingerPrint.RECCOUNT()]
lnRecCount = 1 && Thread.Reset()
SCAN
---ZKFPEngX1.AddRegTemplateStrToFPCacheDB(fpcHandle, lnRecCount, nTemp.fpString)
---FFingerNames[lnRecCount] = nTemp.Name
---lnRecCount = lnRecCount + 1
ENDSCAN
USE IN fpTable
Tag : .NET, Web (ASP.NET), Win (Windows App), VB.NET, C#
Private Sub UpdateText(ByVal s As String)
If Me.txtOutput.InvokeRequired Then
Dim x As New SetTextCallBack(AddressOf ReceivedText)
Me.Invoke(x, New Object() {(Text)})
Else
Me.txtOutput.AppendText(s & vbCrLf)
End If
End Sub
*VFP/SQLLite is Better than MS Access.
SET DEFAULT TO "C:\yourWorkFolder"
nTemp = SYS(3)
USE fpTable SHARED IN 0 ALIAS (nTemp + "FingerPrint")
SELECT nTemp
DIMENSION FFingerNames[nTemp.RECCOUNT()]
lnRecCount = 1 &&Thread.Reset() SCAN
---ZKFPEngX1.AddRegTemplateStrToFPCacheDB(fpcHandle, lnRecCount, nTemp.fpString)
---FFingerNames[lnRecCount] = nTemp.Name
---lnRecCount = lnRecCount + 1
ENDSCAN
USE IN fpTable
Date :
2013-05-11 21:44:37
By :
ผ่านมา
No. 3
Guest
#No 2 Thread.Reset()
Code (VB.NET)
Imports System.Threading
Public Class frmThreadDelegate02
Private Delegate Sub DialogCallBack(ByVal msg As String)
Private Delegate Sub ThreadFinishedCallBack()
Private _DialogCallBack As DialogCallBack
Private _DialogCallBack2 As DialogCallBack
Private _threadFinishedCallBack As ThreadFinishedCallBack
Private _IsThreadRunning As Boolean = False
Private _ManualResetEvent As ManualResetEvent
Public Sub New()
InitializeComponent()
_DialogCallBack = New DialogCallBack(AddressOf WriteCountLog)
_DialogCallBack2 = New DialogCallBack(AddressOf WriteStatusLog)
_threadFinishedCallBack = New ThreadFinishedCallBack(AddressOf ThreadFinished)
_ManualResetEvent = New ManualResetEvent(False)
End Sub
Private Sub frmThreadDelegate02_FormClosed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
ThreadFinished()
End Sub
Private Sub frmThreadDelegate02_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
ThreadFinished()
End Sub
Private Sub frmThreadDelegate01_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
CheckForIllegalCrossThreadCalls = False
End Sub
Private Sub btnCounter_Click(sender As System.Object, e As System.EventArgs) Handles btnCounter.Click
If _IsThreadRunning Then
_IsThreadRunning = False
_ManualResetEvent.Set()
btnCounter.Text = "Start/Stop/Pause"
Else
lblCounter.Text = "0"
_IsThreadRunning = True
btnCounter.Text = "Pause/Stop"
_ManualResetEvent.Reset()
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf Test_ThreadProc), New Object())
End If
End Sub
Private Sub WriteCountLog(ByVal msg1 As Integer)
lblCounter.Text = msg1
End Sub
Private Sub WriteStatusLog(ByVal msg1 As String)
lblThreadStatus.Text = msg1
End Sub
Private Sub ThreadFinished()
Control.CheckForIllegalCrossThreadCalls = False
btnCounter.Text = "Start/Pause/Stop"
_IsThreadRunning = False
WriteCountLog(0)
WriteStatusLog("Thread Status : Stop")
End Sub
Private Sub Test_ThreadProc(ByVal stateInfo As Object)
lblThreadStatus.Invoke(_DialogCallBack2, New Object() {"Thread Status : Started"})
Try
Dim i As Integer = 0
While (i < 1000001) AndAlso Not _ManualResetEvent.WaitOne(0) 'For Start/Pause/Stop
WriteCountLog(i)
Thread.Sleep(123)
i += 1
End While
Catch exp As Exception
lblThreadStatus.Invoke(_DialogCallBack2, New Object() {"Exception caught:" & exp.Message})
Finally
ThreadFinished()
End Try
End Sub
End Class
Date :
2013-05-11 21:46:27
By :
ผ่านมา
No. 4
Guest
เสียดาย ผมอายุสั้นไม่ยืนยาว (ไกล้ตายห่าแล้ว)
พึ่งจะ Hello World C++ Code (C#)
#include <iostream>
using namespace std;
// main() is where program execution begins.
int main()
{
cout << "Hello World C++"; //print Hello World C++
return 0;
}
//punctuation = วรรคตอน
//Thus = ดังนั้น
//ManPower = แข็งแรง