Imports c3Vfd256.ClsVfd256
Public Class VFD256IIISample
Private Sub VFD256IIISample_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim list As New ArrayList()
'接続ポート一覧を取得
For Each portName As String In My.Computer.Ports.SerialPortNames
list.Add(portName)
Next
If list.Count = 0 Then
CmbPort.SelectedText = ""
Else
CmbPort.SelectedText = list(0).ToString
End If
End Sub
'表示ボタン押下時
'エラー処理は省略しています
Private Sub BtnDisp_Click(sender As Object, e As EventArgs) Handles BtnDisp.Click
'VFD256Ⅲに書き込む文字を設定
Vfd2561.Msg0 = Text1.Text
Vfd2561.Msg1 = Text2.Text
Vfd2561.Msg2 = Text3.Text
Vfd2561.Msg3 = Text4.Text
'接続ポートを指定
Vfd2561.Port = CmbPort.Text
'VFD256ⅢにMa3モード(32dot,2行)で表示
Vfd2561.DispVFD(c3Vfd256.ClsVfd256.TypeDispMode.a3_2_32_32)
End Sub
'クリアボタン押下時
'エラー処理は省略しています
Private Sub BtnClr_Click(sender As Object, e As EventArgs) Handles BtnClr.Click
'接続ポートを指定
Vfd2561.Port = CmbPort.Text
'VFD256Ⅱの表示をクリア
Vfd2561.CLS()
End Sub
'終了ボタン押下時
Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click
Application.Exit()
End Sub
End Class
|