VisuaL Basic ( ÜLkeLer Arası Saat Değişim Farkı Programı )
Dim a, b, c, d As Integer
Private Sub Form_Load()
Combo1.ListIndex = 0
Label3.ForeColor = vbRed
Label5.ForeColor = vbRed
a = Hour(Time)
b = Minute(Time)
c = Second(Time)
Label2.Caption = Hour(Time)
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
End Sub
Private Sub Timer1_Timer()
Label3.ForeColor = vbGreen
Label5.ForeColor = vbGreen
Label2.Caption = Hour(Time)
If Combo1.ListIndex = 0 Then
Label1.Caption = " TÜRKİYE"
Label2.ForeColor = vbBlue
Label4.ForeColor = vbBlue
Label6.ForeColor = vbBlue
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
End If
If Minute(Time) < 10 Then
Label4.Caption = "0" & Minute(Time)
End If
If Second(Time) < 10 Then
Label6.Caption = "0" & Second(Time)
End If
If Combo1.ListIndex = 1 Then
a = Hour(Time)
Label2.Caption = a + 1
Label1.Caption = "Çin"
Label2.ForeColor = vbBlue
Label4.ForeColor = vbBlue
Label6.ForeColor = vbBlue
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
Label7.Caption = "Türkiye İle arasında 1 saat vardır"
End If
If Minute(Time) < 10 Then
Label4.Caption = "0" & Minute(Time)
End If
If Second(Time) < 10 Then
Label6.Caption = "0" & Second(Time)
End If
If Combo1.ListIndex = 2 Then
a = Hour(Time)
Label2.Caption = a + 2
Label1.Caption = "Japonya"
Label2.ForeColor = vbBlue
Label4.ForeColor = vbBlue
Label6.ForeColor = vbBlue
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
Label7.Caption = "Türkiye İle arasında 2 saat vardır"
End If
If Minute(Time) < 10 Then
Label4.Caption = "0" & Minute(Time)
End If
If Second(Time) < 10 Then
Label6.Caption = "0" & Second(Time)
End If
If Combo1.ListIndex = 3 Then
a = Hour(Time)
Label2.Caption = a + 3
Label1.Caption = "Rusya"
Label2.ForeColor = vbBlue
Label4.ForeColor = vbBlue
Label6.ForeColor = vbBlue
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
Label7.Caption = "Türkiye İle arasında 3 saat vardır"
End If
If Minute(Time) < 10 Then
Label4.Caption = "0" & Minute(Time)
End If
If Second(Time) < 10 Then
Label6.Caption = "0" & Second(Time)
End If
If Combo1.ListIndex = 4 Then
a = Hour(Time)
Label2.Caption = a + 4
Label1.Caption = "İtalya"
Label2.ForeColor = vbBlue
Label4.ForeColor = vbBlue
Label6.ForeColor = vbBlue
Label4.Caption = Minute(Time)
Label6.Caption = Second(Time)
Label7.Caption = "Türkiye İle arasında 4 saat vardır"
End If
If Minute(Time) < 10 Then
Label4.Caption = "0" & Minute(Time)
End If
If Second(Time) < 10 Then
Label6.Caption = "0" & Second(Time)
End If
End Sub
Private Sub Timer2_Timer()
Label3.ForeColor = vbRed
Label5.ForeColor = vbRed
Label2.ForeColor = vbYellow
Label4.ForeColor = vbYellow
Label6.ForeColor = vbYellow
End Sub