![]() |
Schaltuhr in delphi
Hallo,
unten seht ihr das Programm einer Zeitschaltuhr, das in VB geschrieben worden ist und funktioniert. Wer kann mir dabei helfen, dieses in Delphi umzuwandeln...
Code:
Danke im voraus
Private Sub Form_Load()
If OPENCOM("COM2:9600,N,8,1") = 0 Then MsgBox ("COM2 belegt") Timer1.Interval = 1000 Timer1.Enabled = True End Sub Private Sub Form_Unload(Cancel As Integer) CLOSECOM End Sub Private Sub Timer1_Timer() Text1.Text = Time$ If Time$ < Text1.Text Then DTR 0 If (Time$ > Text2.Text) And (Time$ < Text3.Text) Then DTR 1 If (Time$ > Text3.Text) And (Time$ < Text4.Text) Then DTR 0 If (Time$ > Text4.Text) And (Time$ < Text5.Text) Then DTR 1 If (Time$ > Text5.Text) Then DTR 0 End Sub Gruß Thorsten |
Re: Schaltuhr in delphi
Kuck dir mal die TTimer-Komponente an und was die Hilfe dazu sagt. Dann solltest du das hinbekommen.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:53 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz