xroniki diarkeia sti visual basic (5)

Συζητήσεις για τις γλώσσες του dot Net και για του Visual Studio της Microsoft

Συντονιστές: WebDev Moderators, Super-Moderators

Απάντηση
ptixiaki
Δημοσιεύσεις: 2
Εγγραφή: 13 Νοέμ 2005 16:05

xroniki diarkeia sti visual basic (5)

Δημοσίευση από ptixiaki » 13 Νοέμ 2005 16:09

exw to parakatw programma:

If Buffer = 1 Then
device1on.ZOrder
datatext.Text = datatext.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 2 Then
device2on.ZOrder
datatext.SelStart = 23
datatext.Text = datatext.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 3 Then
device3on.ZOrder
datatext.Text = datatext.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 4 Then
device4on.ZOrder
datatext.Text = datatext.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If

If Buffer = 5 Then
device1off.ZOrder
datatext.Text = datatext.Text & "H 1h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 6 Then
device2off.ZOrder
datatext.Text = datatext.Text & "H 2h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 7 Then
device3off.ZOrder
datatext.Text = datatext.Text & "H 3h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 8 Then
device4off.ZOrder
datatext.Text = datatext.Text & "H 4h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If

auto pou kanei einai molis dexetai apo to buffer mia timi, katagrafei tin trexousa wra kai imeromina
exw 4 zeugaria timwn
1-5
2-6
3-7
4-8
auto pou thelw einai otan dwthei h timi 1, na arxisei na metraei enas metritis kai na termatistei otan dwthei h timi 5 (omoia kai gia ta alla zeugh timwn)
enallaktika na katagrafontai h prwti wra/imerominia kai meta h deuteri kai na ginetai mia idiotipi afairesi
kati tetoio telos pantwn, gia na fainetai posi wra perase apo ti stigmi pou dwthike to 1 mexri na dwthei to 5 klp
kamia voithia?
euxaristw

Άβαταρ μέλους
veriotis
Graphics Moderator
Δημοσιεύσεις: 1360
Εγγραφή: 22 Δεκ 2003 21:30
Τοποθεσία: Βέροια
Επικοινωνία:

xroniki diarkeia sti visual basic (5)

Δημοσίευση από veriotis » 15 Νοέμ 2005 13:45

an kai den eime programatistis asxoloume erasitechnika me tin vb opote mpori na iparchi kaliteros tropos apo auton edo alla mias ke den anefere kanis kapio alo tropo
eutiaksa auton ton kodika opou kani tin doulia pou thes
apla tha prosthesis enan timer sto project sou me interval = 1 kai enable =false
kai kodika

Κώδικας: Επιλογή όλων

Private Sub Timer1_Timer()
Sec = Sec + 1
If Sec = 6000 Then
    min = min + 1
    Sec = 0
End If
If min = 60 Then
    ores = ores + 1
    min = 0
End If
If ores = 24 Then
    meres = meres + 1
    ores = 0
End If
End Sub
pano pano tha valis to

Κώδικας: Επιλογή όλων

Dim Sec As Integer
Dim min As Integer
Dim ores As Integer
Dim meres As Integer
episis ena label h textbox gia na emfanisis eki ton xrono pou perase
kai ston kodika pou edoses tha kanis tis allages pou ekana edo

Κώδικας: Επιλογή όλων

If Buffer = 1 Then
Sec = 0 ' midenisma ton xronon
min = 0
ores = 0
meres = 0
Timer1 = True ' ekinisi xronometrisis
device1on.ZOrder
DataText.Text = DataText.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 2 Then
Sec = 0 ' midenisma ton xronon
min = 0
ores = 0
meres = 0
Timer1 = True ' ekinisi xronometrisis
device2on.ZOrder
DataText.SelStart = 23
DataText.Text = DataText.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 3 Then
Sec = 0 ' midenisma ton xronon
min = 0
ores = 0
meres = 0
Timer1 = True ' ekinisi xronometrisis
device3on.ZOrder
DataText.Text = DataText.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If
If Buffer = 4 Then
Sec = 0 ' midenisma ton xronon
min = 0
ores = 0
meres = 0
Timer1 = True ' ekinisi xronometrisis
device4on.ZOrder
DataText.Text = DataText.Text & "Enarksi" & Buffer & "hs metrisis: " & Time$ & " " & Date$ & " "
End If

If Buffer = 5 Then
Timer1 = False ' telos xronometrisis
'kapou prepi na doume ton xrono ,ego to evala se label
Label1 = meres & " meres , kai " & ores & ":" & min & ":" & Sec / 100 & " ores"
device1off.ZOrder
DataText.Text = DataText.Text & "H 1h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 6 Then
Timer1 = False
'kapou prepi na doume ton xrono ,ego to evala se label
Label1 = meres & " meres , kai " & ores & ":" & min & ":" & Sec / 100 & " ores"
device2off.ZOrder
DataText.Text = DataText.Text & "H 2h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 7 Then
Timer1 = False
'kapou prepi na doume ton xrono ,ego to evala se label
Label1 = meres & " meres , kai " & ores & ":" & min & ":" & Sec / 100 & " ores"
device3off.ZOrder
DataText.Text = DataText.Text & "H 3h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
If Buffer = 8 Then
Timer1 = False
'kapou prepi na doume ton xrono ,ego to evala se label
Label1 = meres & " meres , kai " & ores & ":" & min & ":" & Sec / 100 & " ores"
device4off.ZOrder
DataText.Text = DataText.Text & "H 4h metrisi termatistike stis" & Time$ & " " & Date$ & " "
End If
filika veriotis

Απάντηση

Επιστροφή στο “dot Net και Visual Studio”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 1 επισκέπτης