BİLİŞİM TEKNOLOJİLERİ 12/E
  VISUAL BASİC 2
 
KAYAN YAZI KODU
KAYAN YAZI KODU

Private Sub Timer1_Timer()
  Label1.Caption = Mid(Label1.Caption, 2) + Left(Label1.Caption, 1) 'label alanında kayan yazı
End Sub

BASİT FOR NEXT DÖNGÜSÜ KODU

Private Sub Command1_Click()
  For i = 0 To 9
  say = say + 1
  Next i
  Print say
  MsgBox " İLK ONCE 10 YAZDIRILDI", 32, "İLK YAZDIRILAN"
 

  For j = 0 To Text1.Text
  a = a + 1
  Next j
  Print a
  MsgBox "SONRA " & a & " YAZDIRILDI ", 32, "SON YAZDIRILAN"
End Sub

Private Sub Command2_Click()
  End 'Programı kapatan kod
End Sub

Private Sub Timer1_Timer()
  Label1.Caption = Mid(Label1.Caption, 2) + Left(Label1.Caption, 1)
End Sub


 

BİLGİSAYARI ZAMANLI KAPATMA KODU


Dim saat, dakika, saniye As Integer
Dim a As Integer
Private Sub Command2_Click()
a = MsgBox("Bilgisayarına reset atılsınmı?", 67)
Select Case a
Case 2: MsgBox "Reset Atma İşlemi İptal Edildi", 64, "Reset Atılacak"
Case 6: MsgBox "Reset Atılacak", 64, "Reset Atılacak"
Shell ("shutdown -r -t 1")
'not:Bilgisayara Reset attırma kodu Case 7: MsgBox "Hayır Atılmasın", 64, "Reset Atılmayacak"
End Select
End Sub
Private Sub Form_Load()
Label3.Caption = Second(Time)
Label2.Caption = Minute(Time)
Label1.Caption = Hour(Time)

saat = Hour(Time)
dakika = Minute(Time)
saniye = Second(Time)
End Sub

Private Sub Timer1_Timer()
If Label3.Caption = Text3.Text Then
If Label2.Caption = Text2.Text Then
If Label1.Caption = Text1.Text Then
MsgBox "Bilgisayarınız Kapanacak", 64, "Kapanıyor"
Shell ("shutdown -s -t 1")
'(not:Bilgisayarı Kapatma kodu)
End If
End If
End If

'(Not:Bu satırdan aşagı saat le ilgili kodlar)
saniye = saniye + 1
If saniye = 60 Then
saniye = 0

dakika = dakika + 1
If dakika = 60 Then
dakika = 0

saat = saat + 1
If saat = 24 Then
saat = 0

End If
End If
End If

Label1.Caption = saat
Label2.Caption = dakika
Label3.Caption = saniye

End Sub
Private Sub Timer2_Timer()
Label8.Caption = Mid(Label8.Caption, 2) + Left(Label8.Caption, 1)
End Sub



 
  BUGUN 5 ziyaretçi  
 





Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol