Q&A

  • VB질문입니다. 델파이로 바꾸기
비주얼 베이직 dll 사용하는 소스인데..
제가 비주얼 베이직 사용 못해바서
델파이로 프로그래밍 하고 싶은데..
어떻게 바꿔야 하는지 ..
dll 도 경험이 없어서..
부탁드립니다.
------------------------------------------------------

Dim WithEvents PM As PhidgetManager
Attribute PM.VB_VarHelpID = -1
Dim WithEvents rfid As PhidgetRFID
Attribute rfid.VB_VarHelpID = -1

Private Sub Form_Load()
    Set PM = New PhidgetManager
    lblTag.Caption = "Attach an RFID Tag Reader"
End Sub

Private Sub PM_OnAttach(ByVal PHIDGET As PHIDGET.IPhidget)
    
    If PHIDGET.DeviceType = "PhidgetRFID" Then
        Set rfid = PHIDGET
        rfid.OutputState(3) = True        'Output #3 Enables RFID reader
        lblTag.Caption = "Tag number: "
    End If
End Sub

Private Sub PM_OnDetach(ByVal PHIDGET As PHIDGET.IPhidget)
    If PHIDGET.DeviceType = "PhidgetRFID" Then
        lblTimes.Caption = ""
        lblTag.Caption = "Attach an RFID Tag Reader"
    End If
End Sub

Private Sub rfid_OnTag(ByVal TagNumber As String)
    Static PreviousTag As String
    Static Count As Long
    If TagNumber = PreviousTag Then Count = Count + 1 Else Count = 1
    lblTag.Caption = "Tag number: " & TagNumber
    lblTimes.Caption = "Times seen: " & Count
    PreviousTag = TagNumber
End Sub
0  COMMENTS