Type=Exe
Form=frmOnOffRelay.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdol
e2.tlb#OLE Automation
Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSCOMM32.OCX
Startup="Form1"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3135
ClientLeft = 60
ClientTop = 405
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3135
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.OptionButton Option2
Caption = "Option2"
Height = 255
Left = 2880
TabIndex = 2
Top = 240
Width = 1095
End
Begin VB.OptionButton Option1
Caption = "Option1"
Height = 195
Left = 960
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 855
Left = 2160
TabIndex = 0
Top = 720
Width = 1215
End
Begin MSCommLib.MSComm MSComm1
Left = 960
Top = 840
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin VB.Label Label1
Caption = "Label1"
Height = 255
Left = 840
TabIndex = 3
Top = 2040
Width = 975
End
Begin VB.Shape Shape1
Height = 615
Left = 2760
Top = 2040
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim bytData() As Byte
ReDim bytData(3)
bytData(0) = &HA0
bytData(1) = &H1
bytData(2) = &H1
bytData(3) = &HA2
sleep (100)
bytData(0) = &HA0
bytData(1) = &H1
bytData(2) = &H0
bytData(3) = &HA1
MSComm1.Output = bytData
'If Option1 = True Then
'bytData(0) = &HA0
'b'ytData(1) = &H1
'bytData(2) = &H1
'bytData(3) = &HA2
'Else
'bytData(0) = &HA0
'bytData(1) = &H1
'bytData(2) = &H0
'bytData(3) = &HA1
'End If
'MSComm1.Output = bytData
End Sub
Private Sub Form_Load()
MSComm1.RThreshold = 1
MSComm1.InputLen = 1
MSComm1.Settings = "9600,n,8,1"
MSComm1.CommPort = 7
MSComm1.PortOpen = True
MSComm1.DTREnable = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub