Convert VB6 to C# use NDDE ? help
Posted
by tabvn
on Stack Overflow
See other posts from Stack Overflow
or by tabvn
Published on 2010-05-09T02:01:58Z
Indexed on
2010/05/09
2:08 UTC
Read the original article
Hit count: 461
vb6
i have a vb6 code i want to use http://ndde.codeplex.com/ , please help me convert to c#
thanks
Const TOPIC_SENSOR As String = "SeeLane|Sensor"
Const TOPIC_GATE As String = "SeeLane|Gate"
Const TOPIC_PIN As String = "SeeLane|Pin"
Const ITEM_SENSOR_ACTIVATE As String = "Activate"
Const ITEM_GATE_OPEN As String = "Open"
Const ITEM_PIN_ON As String = "On"
Const ITEM_PIN_OFF As String = "Off"
Private Sub Form_Load()
On Error GoTo NO_DDE_SERVER
lblCar.LinkMode = vbLinkNotify
lblLaneId.LinkMode = vbLinkManual
lblName.LinkMode = vbLinkManual
lblAuthorized.LinkMode = vbLinkManual
lblFile.LinkMode = vbLinkManual
lblConfidence.LinkMode = vbLinkManual
lblType.LinkMode = vbLinkManual
MsgBox "Ket noi voi thanh cong voi SeeLane !!!"
Exit Sub
NO_DDE_SERVER:
MsgBox "Khong the ket noi voi SeeLane !(Xem chuong trinh co chay khong?)."
Exit Sub
End Sub
Private Sub lblCar_LinkNotify()
On Error Resume Next
lblCar.LinkRequest
lblLaneId.LinkRequest
lblName.LinkRequest
lblAuthorized.LinkRequest
lblFile.LinkRequest
lblConfidence.LinkRequest
lblType.LinkRequest
CheckAuthorized
lblLaneId.Caption = lblLaneId.Caption + 1
End Sub
Private Sub CheckAuthorized()
Dim i As Integer
i = lblAuthorized.Caption
i = i + 1
If lblAuthorized.Caption = 1 Then
lblPoke.LinkTopic = TOPIC_GATE
lblPoke.LinkItem = ITEM_GATE_OPEN
lblPoke = Chr(lblLaneId.Caption)
lblPoke.LinkMode = vbLinkManual
lblPoke.LinkPoke
End If
End Sub
© Stack Overflow or respective owner