Also ich versuche es mal :
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| Declare Function OPENCOM Lib "RSLINE.DLL" (ByVal A As Integer) As Integer Declare Sub Delay Lib "RSLINE.DLL" (ByVal Zeit As Integer) Declare Sub DTR Lib "RSLINE.DLL" (ByVal An As Integer) Declare Sub RTS Lib "RSLINE.DLL" (ByVal An As Integer) Declare Sub TXD Lib "RSLINE.DLL" (ByVal An As Integer) Declare Function CTS Lib "RSLINE.DLL" () As Integer Declare Function DCD Lib "RSLINE.DLL" () As Integer Declare Function DSR Lib "RSLINE.DLL" () As Integer Declare Function RI Lib "RSLINE.DLL" () As Integer Declare Sub TimeInit Lib "RSLINE.DLL" () Declare Function TIMEREAD Lib "RSLINE.DLL" () As Integer |
In diesem Teil werden die Funktionen der RSLINE.DLL deklariert.
Quelltext
1: 2: 3:
| Dim Zaehler Dim Zaehler_alt Dim Zustand |
Dieser Teil legt Variablen fest.
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
| Sub Command1_Click () Timer1.Enabled = True End Sub
Sub Command2_Click () Timer1.Enabled = False End Sub
Sub Command3_Click () Zaehler = 0: Zaehler_alt = 0 TimeInit Text1.Text = Str$(Zaehler) End Sub |
Hier wird auf die Butonclicks reagiert. Der letzte Teil behandelt nur noch, was passieren soll, wenn dir Form angezeigt wird und wenn Sie geschlossen wird.
Wie gesagt, alle Angaben ohne Gewähr.