Option Strict Off
Option Explicit On
Friend Class frmFuncTest
	Inherits System.Windows.Forms.Form
#Region "Windows フォーム デザイナによって生成されたコード"
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'スタートアップ フォームについては、最初に作成されたインスタンスが既定インスタンスになります。
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'この呼び出しは、Windows フォーム デザイナで必要です。
		InitializeComponent()
	End Sub
	'Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
	Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
		If Disposing Then
			If Not components Is Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(Disposing)
	End Sub
	'Windows フォーム デザイナで必要です。
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents Command16 As System.Windows.Forms.Button
	Public WithEvents Command18 As System.Windows.Forms.Button
	Public WithEvents Command17 As System.Windows.Forms.Button
	Public WithEvents cmdEnd As System.Windows.Forms.Button
	Public WithEvents Command13 As System.Windows.Forms.Button
	Public WithEvents Command12 As System.Windows.Forms.Button
	Public WithEvents Command11 As System.Windows.Forms.Button
	Public WithEvents Command10 As System.Windows.Forms.Button
	Public WithEvents Command9 As System.Windows.Forms.Button
	Public WithEvents Command8 As System.Windows.Forms.Button
	Public WithEvents Command7 As System.Windows.Forms.Button
	Public WithEvents Command5 As System.Windows.Forms.Button
	Public WithEvents Command4 As System.Windows.Forms.Button
	Public WithEvents Command2 As System.Windows.Forms.Button
	Public WithEvents Command1 As System.Windows.Forms.Button
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Command3 As System.Windows.Forms.Button
	Public WithEvents Command6 As System.Windows.Forms.Button
	Public WithEvents Command15 As System.Windows.Forms.Button
	Public WithEvents Command14 As System.Windows.Forms.Button
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	'メモ : 以下のプロシージャは Windows フォーム デザイナで必要です。
	'Windows フォーム デザイナを使って変更できます。
	'コードエディタを使って修正しないでください。


	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmFuncTest))
		Me.components = New System.ComponentModel.Container()
		Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
		Me.ToolTip1.Active = True
		Me.Command16 = New System.Windows.Forms.Button
		Me.Command18 = New System.Windows.Forms.Button
		Me.Command17 = New System.Windows.Forms.Button
		Me.cmdEnd = New System.Windows.Forms.Button
		Me.Command13 = New System.Windows.Forms.Button
		Me.Command12 = New System.Windows.Forms.Button
		Me.Command11 = New System.Windows.Forms.Button
		Me.Command10 = New System.Windows.Forms.Button
		Me.Command9 = New System.Windows.Forms.Button
		Me.Command8 = New System.Windows.Forms.Button
		Me.Command7 = New System.Windows.Forms.Button
		Me.Command5 = New System.Windows.Forms.Button
		Me.Command4 = New System.Windows.Forms.Button
		Me.Command2 = New System.Windows.Forms.Button
		Me.Command1 = New System.Windows.Forms.Button
		Me.Frame1 = New System.Windows.Forms.GroupBox
		Me.Frame2 = New System.Windows.Forms.GroupBox
		Me.Command3 = New System.Windows.Forms.Button
		Me.Command6 = New System.Windows.Forms.Button
		Me.Command15 = New System.Windows.Forms.Button
		Me.Command14 = New System.Windows.Forms.Button
		Me.Text = "WelHTCom通信制御サンプル"
		Me.ClientSize = New System.Drawing.Size(617, 497)
		Me.Location = New System.Drawing.Point(4, 30)
		Me.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation
		Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
		Me.BackColor = System.Drawing.SystemColors.Control
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
		Me.ControlBox = True
		Me.Enabled = True
		Me.KeyPreview = False
		Me.MaximizeBox = True
		Me.MinimizeBox = True
		Me.Cursor = System.Windows.Forms.Cursors.Default
		Me.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.ShowInTaskbar = True
		Me.HelpButton = False
		Me.WindowState = System.Windows.Forms.FormWindowState.Normal
		Me.Name = "frmFuncTest"
		Me.Command16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command16.Text = "WelHTPutRawData_Wait (""ENQ""-FilenameWait)"
		Me.Command16.Size = New System.Drawing.Size(145, 33)
		Me.Command16.Location = New System.Drawing.Point(48, 264)
		Me.Command16.TabIndex = 20
		Me.Command16.BackColor = System.Drawing.SystemColors.Control
		Me.Command16.CausesValidation = True
		Me.Command16.Enabled = True
		Me.Command16.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command16.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command16.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command16.TabStop = True
		Me.Command16.Name = "Command16"
		Me.Command18.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command18.Text = "WelHTPutRawData  (""NAC"")"
		Me.Command18.Size = New System.Drawing.Size(129, 33)
		Me.Command18.Location = New System.Drawing.Point(352, 264)
		Me.Command18.TabIndex = 17
		Me.Command18.BackColor = System.Drawing.SystemColors.Control
		Me.Command18.CausesValidation = True
		Me.Command18.Enabled = True
		Me.Command18.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command18.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command18.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command18.TabStop = True
		Me.Command18.Name = "Command18"
		Me.Command17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command17.Text = "WelHTPutRawData  (""ACK"")"
		Me.Command17.Size = New System.Drawing.Size(129, 33)
		Me.Command17.Location = New System.Drawing.Point(208, 264)
		Me.Command17.TabIndex = 16
		Me.Command17.BackColor = System.Drawing.SystemColors.Control
		Me.Command17.CausesValidation = True
		Me.Command17.Enabled = True
		Me.Command17.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command17.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command17.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command17.TabStop = True
		Me.Command17.Name = "Command17"
		Me.cmdEnd.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.CancelButton = Me.cmdEnd
		Me.cmdEnd.Text = "終了"
		Me.cmdEnd.Size = New System.Drawing.Size(81, 33)
		Me.cmdEnd.Location = New System.Drawing.Point(512, 16)
		Me.cmdEnd.TabIndex = 13
		Me.cmdEnd.BackColor = System.Drawing.SystemColors.Control
		Me.cmdEnd.CausesValidation = True
		Me.cmdEnd.Enabled = True
		Me.cmdEnd.ForeColor = System.Drawing.SystemColors.ControlText
		Me.cmdEnd.Cursor = System.Windows.Forms.Cursors.Default
		Me.cmdEnd.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.cmdEnd.TabStop = True
		Me.cmdEnd.Name = "cmdEnd"
		Me.Command13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command13.Text = "WelClearCom"
		Me.Command13.Size = New System.Drawing.Size(121, 33)
		Me.Command13.Location = New System.Drawing.Point(360, 368)
		Me.Command13.TabIndex = 10
		Me.Command13.BackColor = System.Drawing.SystemColors.Control
		Me.Command13.CausesValidation = True
		Me.Command13.Enabled = True
		Me.Command13.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command13.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command13.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command13.TabStop = True
		Me.Command13.Name = "Command13"
		Me.Command12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command12.Text = "WelReadCom"
		Me.Command12.Size = New System.Drawing.Size(129, 33)
		Me.Command12.Location = New System.Drawing.Point(208, 408)
		Me.Command12.TabIndex = 12
		Me.Command12.BackColor = System.Drawing.SystemColors.Control
		Me.Command12.CausesValidation = True
		Me.Command12.Enabled = True
		Me.Command12.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command12.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command12.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command12.TabStop = True
		Me.Command12.Name = "Command12"
		Me.Command11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command11.Text = "WelWriteCom (""MASTER""cr)"
		Me.Command11.Size = New System.Drawing.Size(129, 33)
		Me.Command11.Location = New System.Drawing.Point(48, 408)
		Me.Command11.TabIndex = 11
		Me.Command11.BackColor = System.Drawing.SystemColors.Control
		Me.Command11.CausesValidation = True
		Me.Command11.Enabled = True
		Me.Command11.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command11.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command11.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command11.TabStop = True
		Me.Command11.Name = "Command11"
		Me.Command10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command10.Text = "WelHTCancelCom     　 (通信の中断)"
		Me.Command10.Size = New System.Drawing.Size(129, 33)
		Me.Command10.Location = New System.Drawing.Point(344, 32)
		Me.Command10.TabIndex = 2
		Me.Command10.BackColor = System.Drawing.SystemColors.Control
		Me.Command10.CausesValidation = True
		Me.Command10.Enabled = True
		Me.Command10.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command10.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command10.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command10.TabStop = True
		Me.Command10.Name = "Command10"
		Me.Command9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command9.Text = "WelCloseCom"
		Me.Command9.Size = New System.Drawing.Size(129, 33)
		Me.Command9.Location = New System.Drawing.Point(208, 368)
		Me.Command9.TabIndex = 9
		Me.Command9.BackColor = System.Drawing.SystemColors.Control
		Me.Command9.CausesValidation = True
		Me.Command9.Enabled = True
		Me.Command9.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command9.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command9.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command9.TabStop = True
		Me.Command9.Name = "Command9"
		Me.Command8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command8.Text = "WelOpenCom"
		Me.Command8.Size = New System.Drawing.Size(129, 33)
		Me.Command8.Location = New System.Drawing.Point(48, 368)
		Me.Command8.TabIndex = 8
		Me.Command8.BackColor = System.Drawing.SystemColors.Control
		Me.Command8.CausesValidation = True
		Me.Command8.Enabled = True
		Me.Command8.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command8.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command8.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command8.TabStop = True
		Me.Command8.Name = "Command8"
		Me.Command7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command7.Text = "WelHTGetTextData"
		Me.Command7.Size = New System.Drawing.Size(129, 33)
		Me.Command7.Location = New System.Drawing.Point(344, 136)
		Me.Command7.TabIndex = 5
		Me.Command7.BackColor = System.Drawing.SystemColors.Control
		Me.Command7.CausesValidation = True
		Me.Command7.Enabled = True
		Me.Command7.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command7.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command7.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command7.TabStop = True
		Me.Command7.Name = "Command7"
		Me.Command5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command5.Text = "WelHTPutRawData_Wait (""END""-""ACK""wait)"
		Me.Command5.Size = New System.Drawing.Size(137, 33)
		Me.Command5.Location = New System.Drawing.Point(200, 88)
		Me.Command5.TabIndex = 3
		Me.Command5.BackColor = System.Drawing.SystemColors.Control
		Me.Command5.CausesValidation = True
		Me.Command5.Enabled = True
		Me.Command5.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command5.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command5.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command5.TabStop = True
		Me.Command5.Name = "Command5"
		Me.Command4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command4.Text = "WelHTGetRawData"
		Me.Command4.Size = New System.Drawing.Size(129, 33)
		Me.Command4.Location = New System.Drawing.Point(344, 88)
		Me.Command4.TabIndex = 4
		Me.Command4.BackColor = System.Drawing.SystemColors.Control
		Me.Command4.CausesValidation = True
		Me.Command4.Enabled = True
		Me.Command4.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command4.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command4.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command4.TabStop = True
		Me.Command4.Name = "Command4"
		Me.Command2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command2.Text = "WelHTPortClose"
		Me.Command2.Size = New System.Drawing.Size(137, 33)
		Me.Command2.Location = New System.Drawing.Point(200, 32)
		Me.Command2.TabIndex = 1
		Me.Command2.BackColor = System.Drawing.SystemColors.Control
		Me.Command2.CausesValidation = True
		Me.Command2.Enabled = True
		Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command2.TabStop = True
		Me.Command2.Name = "Command2"
		Me.Command1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command1.Text = "WelHTPortOpen"
		Me.Command1.Size = New System.Drawing.Size(129, 33)
		Me.Command1.Location = New System.Drawing.Point(56, 32)
		Me.Command1.TabIndex = 0
		Me.Command1.BackColor = System.Drawing.SystemColors.Control
		Me.Command1.CausesValidation = True
		Me.Command1.Enabled = True
		Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command1.TabStop = True
		Me.Command1.Name = "Command1"
		Me.Frame1.Text = "低水準"
		Me.Frame1.Size = New System.Drawing.Size(465, 121)
		Me.Frame1.Location = New System.Drawing.Point(24, 344)
		Me.Frame1.TabIndex = 14
		Me.Frame1.BackColor = System.Drawing.SystemColors.Control
		Me.Frame1.Enabled = True
		Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame1.Visible = True
		Me.Frame1.Name = "Frame1"
		Me.Frame2.Text = "高水準"
		Me.Frame2.Size = New System.Drawing.Size(465, 313)
		Me.Frame2.Location = New System.Drawing.Point(24, 8)
		Me.Frame2.TabIndex = 15
		Me.Frame2.BackColor = System.Drawing.SystemColors.Control
		Me.Frame2.Enabled = True
		Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame2.Visible = True
		Me.Frame2.Name = "Frame2"
		Me.Command3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command3.Text = "WelHTPutRawData (""MASTER"")"
		Me.Command3.Size = New System.Drawing.Size(129, 33)
		Me.Command3.Location = New System.Drawing.Point(32, 80)
		Me.Command3.TabIndex = 19
		Me.Command3.BackColor = System.Drawing.SystemColors.Control
		Me.Command3.CausesValidation = True
		Me.Command3.Enabled = True
		Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command3.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command3.TabStop = True
		Me.Command3.Name = "Command3"
		Me.Command6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command6.Text = "WelHTPutTextData (""1,11,111"")"
		Me.Command6.Size = New System.Drawing.Size(129, 33)
		Me.Command6.Location = New System.Drawing.Point(32, 128)
		Me.Command6.TabIndex = 18
		Me.Command6.BackColor = System.Drawing.SystemColors.Control
		Me.Command6.CausesValidation = True
		Me.Command6.Enabled = True
		Me.Command6.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command6.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command6.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command6.TabStop = True
		Me.Command6.Name = "Command6"
		Me.Command15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command15.Text = "WelHTGetTextData_Retry (DataWait-Retry)"
		Me.Command15.Size = New System.Drawing.Size(169, 33)
		Me.Command15.Location = New System.Drawing.Point(280, 176)
		Me.Command15.TabIndex = 7
		Me.Command15.BackColor = System.Drawing.SystemColors.Control
		Me.Command15.CausesValidation = True
		Me.Command15.Enabled = True
		Me.Command15.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command15.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command15.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command15.TabStop = True
		Me.Command15.Name = "Command15"
		Me.Command14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command14.Text = "WelHTPutTextData_Wait (""2,22,2222""-""ACK""wait)"
		Me.Command14.Size = New System.Drawing.Size(169, 33)
		Me.Command14.Location = New System.Drawing.Point(32, 176)
		Me.Command14.TabIndex = 6
		Me.Command14.BackColor = System.Drawing.SystemColors.Control
		Me.Command14.CausesValidation = True
		Me.Command14.Enabled = True
		Me.Command14.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command14.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command14.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command14.TabStop = True
		Me.Command14.Name = "Command14"
		Me.Controls.Add(Command16)
		Me.Controls.Add(Command18)
		Me.Controls.Add(Command17)
		Me.Controls.Add(cmdEnd)
		Me.Controls.Add(Command13)
		Me.Controls.Add(Command12)
		Me.Controls.Add(Command11)
		Me.Controls.Add(Command10)
		Me.Controls.Add(Command9)
		Me.Controls.Add(Command8)
		Me.Controls.Add(Command7)
		Me.Controls.Add(Command5)
		Me.Controls.Add(Command4)
		Me.Controls.Add(Command2)
		Me.Controls.Add(Command1)
		Me.Controls.Add(Frame1)
		Me.Controls.Add(Frame2)
		Me.Frame2.Controls.Add(Command3)
		Me.Frame2.Controls.Add(Command6)
		Me.Frame2.Controls.Add(Command15)
		Me.Frame2.Controls.Add(Command14)
	End Sub
#End Region 
#Region "アップグレード ウィザードのサポート コード"
	Private Shared m_vb6FormDefInstance As frmFuncTest
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As frmFuncTest
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New frmFuncTest()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	
	Private hcomm As Integer
	
	Private Sub cmdEnd_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdEnd.Click
		Me.Close()
	End Sub
	
	Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
		Dim ret As Integer
		
		ret = vbWelHTPortOpen(hcomm, WelHTCom.PortNoENum.HT_COM5, WelHTCom.BaudRaitENum.HT_BAUD115200, WelHTCom.ConnectModeENum.HT_IR705, WelHTCom.CrcTypeENum.HT_CRC1)
		MsgBox("ret = &H" & Hex(ret))
	End Sub
	
	
	Private Sub Command10_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command10.Click
		vbWelHTCancelCom()
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command11_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command11.Click
		vbWelWriteCom(hcomm, "MASTER" & vbCr)
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command12_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command12.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelReadCom(hcomm, RcvStr, Asc(vbCr))
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command13_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command13.Click
		vbWelClearCom(hcomm)
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command14_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command14.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelHTPutTextData_Wait(hcomm, "2,22,2222", &H31s, RcvStr, 10, 1, WelHTTXTRecieve Or WelHTACKRecieve)
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command15_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command15.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelHTGetTextData_Retry(hcomm, RcvStr, &H30s, 10, 3, WelHTTXTRecieve)
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command16_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command16.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelHTPutRawData_Wait(hcomm, "ENQ", Asc("#"), RcvStr, 1, 10, WelHTTXTRecieve)
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command17_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command17.Click
		vbWelHTPutRawData(hcomm, "ACK")
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command18_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command18.Click
		vbWelHTPutRawData(hcomm, "NAC")
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
		vbWelHTPortClose(hcomm)
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click
		vbWelHTPutRawData(hcomm, "MASTER")
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelHTGetRawData(hcomm, RcvStr)
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click
		Dim ret As Integer
		
		ret = vbWelHTPutRawData_Wait(hcomm, "END", 0, CStr(0), 1, 10, WelHTACKRecieve)
		MsgBox("ret = &H" & Hex(ret))
	End Sub
	
	Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click
		vbWelHTPutTextData(hcomm, "1,11,111", &H30s)
		MsgBox("Complete!")
	End Sub
	
	Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
		Dim ret As Integer
		Dim RcvStr As String
		
		ret = vbWelHTGetTextData(hcomm, RcvStr, &H30s, 1)
		MsgBox("ret = &H" & Hex(ret) & " rcvstr = [" & RcvStr & "]")
	End Sub
	
	Private Sub Command8_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command8.Click
		hcomm = vbWelOpenCom(5, 115200, 1)
		If (hcomm <> 0) Then
			MsgBox("Complete!")
		Else
			MsgBox("Error!")
		End If
	End Sub
	
	Private Sub Command9_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command9.Click
		vbWelCloseCom((hcomm))
		MsgBox("Complete!")
	End Sub
End Class