laatzen/Pruef2000/source/frmTest2.frm
2021-10-01 11:11:04 +02:00

202 lines
5.4 KiB
Plaintext
Raw Permalink Blame History

VERSION 5.00
Begin VB.Form frmTest2
Caption = "Test Formular 2"
ClientHeight = 5580
ClientLeft = 60
ClientTop = 345
ClientWidth = 9705
LinkTopic = "Form2"
ScaleHeight = 5580
ScaleWidth = 9705
StartUpPosition = 3 'Windows-Standard
Begin VB.CommandButton Command6
Caption = "Teste alle"
Height = 495
Left = 7500
TabIndex = 13
Top = 3690
Width = 1365
End
Begin VB.CommandButton Command1
Caption = "Texte anzeigen"
Height = 435
Left = 8040
TabIndex = 11
Top = 270
Width = 945
End
Begin VB.CommandButton Command4
Caption = "Adressieren"
Height = 375
Left = 660
TabIndex = 10
Top = 60
Width = 1215
End
Begin VB.TextBox Text3
Height = 375
Left = 30
TabIndex = 9
Text = "255"
Top = 60
Width = 555
End
Begin VB.Frame Frame1
Height = 1515
Left = 30
TabIndex = 3
Top = 540
Width = 5115
Begin VB.CommandButton Command5
Caption = "PlaceText"
Height = 405
Left = 3750
TabIndex = 12
Top = 540
Width = 1245
End
Begin VB.TextBox Text1
Alignment = 1 'Rechts
Height = 345
Left = 930
TabIndex = 6
Text = "10"
Top = 390
Width = 615
End
Begin VB.TextBox Text2
Alignment = 1 'Rechts
Height = 345
Left = 960
TabIndex = 5
Text = "10"
Top = 840
Width = 615
End
Begin VB.TextBox Text5
Height = 405
Left = 1680
TabIndex = 4
Top = 510
Width = 1815
End
Begin VB.Label Label1
Caption = "X"
Height = 255
Left = 510
TabIndex = 8
Top = 450
Width = 315
End
Begin VB.Label Label2
Caption = "Y"
Height = 255
Left = 540
TabIndex = 7
Top = 900
Width = 315
End
End
Begin VB.CommandButton Command3
Caption = "DefButton Start"
Height = 435
Left = 7560
TabIndex = 2
Top = 2970
Width = 1365
End
Begin VB.CommandButton Command2
Caption = "Makro 0, 1"
Height = 525
Left = 7560
TabIndex = 1
Top = 2400
Width = 1365
End
Begin VB.ListBox List1
Height = 1620
Left = 480
TabIndex = 0
Top = 2160
Width = 3375
End
End
Attribute VB_Name = "frmTest2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private WithEvents m_Display As CEAKIT
Attribute m_Display.VB_VarHelpID = -1
Private Sub Command1_Click()
m_Display.init
m_Display.ClrScreen
' Font 3 kein Zoom
m_Display.EaKitOutput Chr(27) & "F" & Chr(3) & Chr(1) & Chr(1)
' Text-Modus replace Hintergruind l<>schen, Schwarze Pixel setzen
m_Display.EaKitOutput Chr(27) & "L" & Chr(4) & Chr(1)
m_Display.CenterText "Platz 5", 80, 0
m_Display.PlaceText "SerienNr 123456789", 20, 10
' Font 3, 4*x 4*y Zoom
m_Display.EaKitOutput Chr(27) & "F" & Chr(3) & Chr(4) & Chr(4)
m_Display.PlaceText "-2,05", 30, 30
m_Display.EaKitOutput Chr(27) & "F" & Chr(3) & Chr(1) & Chr(1)
End Sub
Private Sub Command2_Click()
' Bildschirm Aufbau
m_Display.CallMakro 0
m_Display.CallMakro 1
End Sub
Private Sub Command3_Click()
m_Display.DefineButton 1, 10, 3, "START"
End Sub
Private Sub Command4_Click()
m_Display.Adressierung Val(Text3.text)
End Sub
Private Sub Command5_Click()
m_Display.PlaceAusgabe Text5.text, Val(Text1.text), Val(Text2.text), Val(Text1.text), Val(Text2.text) - 10
End Sub
Private Sub Command6_Click()
Dim i As Integer
List1.Clear
For i = 1 To 10
m_Display.Adressierung i
m_Display.beep 2
List1.AddItem i
Sleep 1000, True
m_Display.EaKitOutput Chr(27) & "MT" & Chr(i)
Sleep 1000, True
Next
End Sub
Private Sub Form_Load()
On Error Resume Next
Set m_Display = g_App.GetDisplay
m_Display.Adressierung 255
m_Display.ClrScreen
End Sub
Private Sub m_Display_TasteGedrueckt(ByVal bytadresse As Byte, ByVal strText As String)
List1.AddItem Now & " " & bytadresse & " " & strText
m_Display.Adressierung CInt(bytadresse)
m_Display.beep 2
m_Display.PlaceAusgabe Now, 10, 60, 128, 60
End Sub