Jump to content
TNC-TR
FeritEtemSinBin

Zil Programı Yarıda Tıkandım

Recommended Posts

sa merhaba okulum için zil programı yapıyorum yarıda tıkandım normalde ini dosyasından değerleri okutması felan kaldı onları yaparım ama ondan önce ptesid1() ptesid2() funclarını açıklamada österdiğim gibi çalıştırmam lazım 1 ile 2 olursa diğerlerini de yapıcam ama nasıl yapıcam aklıma fikir gelmedi okulumuzda kullanıcaz çoğu kısmı bitti bu bu kaldı (bu sadece bi parçacık ayarlar ekranı verileri tuttuğum ini dosyası felan da var burası biterse gerisine bağlıcam bu kodları)

Spoiler
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <ComboConstants.au3>
#include <AutoItConstants.au3>
$ptesi = GUICreate("P.Tesi",361,609,-1,-1,-1,-1)

$hgun = ""
	If @WDAY = 1 Then
		$hgun = "Pazar"

	ElseIf @WDAY = 2 Then
		$hgun = "P.Tesi"

	ElseIf @WDAY = 3 Then
		$hgun = "Salı"

	ElseIf @WDAY = 4 Then
		$hgun = "Çarşamba"

	ElseIf @WDAY = 5 Then
		$hgun = "Perşembe"

	ElseIf @WDAY = 6 Then
		$hgun = "Cuma"

	Else
		$hgun = "C.Tesi"

	EndIf
	$saat = GUICtrlCreateLabel("Saat : " & @HOUR & ":" & @MIN & ":" & @SEC & "  Tarih : " & @MDAY & "." & @MON & "." & @YEAR & "  Gün : "&$hgun, 55, 595)

;~ -------
GUICtrlCreateLabel("Aktiflik :",23,30,50,15,-1,-1)
GUICtrlCreateLabel("Giriş Zili :",108,16,50,15,-1,-1)
GUICtrlCreateLabel("Saat :",90,31,34,15,-1,-1)
GUICtrlCreateLabel("Dakika :",155,31,50,15,-1,-1)
GUICtrlCreateLabel("Müzik :",241,31,36,15,-1,-1)
GUICtrlCreateLabel("Mola :",321,31,36,15,-1,-1)
GUICtrlCreateLabel("P.Tesi",21,555,300,32,$SS_CENTER,-1)
GUICtrlSetFont(-1,25,400,0)
;~ -------
$ptesid1 = GUICtrlCreateCheckbox("1.Ders",10,50,55,20)
$ptesid2 = GUICtrlCreateCheckbox("2.ders",10,80,55,20)
$ptesid3 = GUICtrlCreateCheckbox("3.ders",10,110,55,20)
$ptesid4 = GUICtrlCreateCheckbox("4.ders",10,140,55,20)
$ptesid5 = GUICtrlCreateCheckbox("5.ders",10,170,55,20)
$ptesid6 = GUICtrlCreateCheckbox("6.ders",10,200,55,20)
$ptesid7 = GUICtrlCreateCheckbox("7.ders",10,230,55,20)
$ptesid8 = GUICtrlCreateCheckbox("8.ders",10,260,55,20)
$ptesid9 = GUICtrlCreateCheckbox("9.ders",10,290,55,20)
$ptesid10 = GUICtrlCreateCheckbox("10.ders",10,320,55,20)
$ptesid11 = GUICtrlCreateCheckbox("11.ders",10,350,55,20)
$ptesid12 = GUICtrlCreateCheckbox("12.ders",10,380,55,20)
$ptesid13 = GUICtrlCreateCheckbox("13.ders",10,410,55,20)
$ptesid14 = GUICtrlCreateCheckbox("14.ders",10,440,55,20)
$ptesid15 = GUICtrlCreateCheckbox("15.ders",10,470,55,20)
$ptesid16 = GUICtrlCreateCheckbox("16.ders",10,500,55,20)
;~ -------
$ptesisaatd1 = GUICtrlCreateCombo("",75,50,60,20)
$ptesisaatd2 = GUICtrlCreateCombo("",75,80,60,20,-1,-1)
$ptesisaatd3 = GUICtrlCreateCombo("",75,110,60,20,-1,-1)
$ptesisaatd4 = GUICtrlCreateCombo("",75,140,60,20,-1,-1)
$ptesisaatd5 = GUICtrlCreateCombo("",75,170,60,20,-1,-1)
$ptesisaatd6 = GUICtrlCreateCombo("",75,200,60,20,-1,-1)
$ptesisaatd7 = GUICtrlCreateCombo("",75,230,60,20,-1,-1)
$ptesisaatd8 = GUICtrlCreateCombo("",75,260,60,20,-1,-1)
$ptesisaatd9 = GUICtrlCreateCombo("",75,290,60,20,-1,-1)
$ptesisaatd10 = GUICtrlCreateCombo("",75,320,60,20,-1,-1)
$ptesisaatd11 = GUICtrlCreateCombo("",75,350,60,20,-1,-1)
$ptesisaatd12 = GUICtrlCreateCombo("",75,380,60,20,-1,-1)
$ptesisaatd13 = GUICtrlCreateCombo("",75,410,60,20,-1,-1)
$ptesisaatd14 = GUICtrlCreateCombo("",75,440,60,20,-1,-1)
$ptesisaatd15 = GUICtrlCreateCombo("",75,470,60,20,-1,-1)
$ptesisaatd16 = GUICtrlCreateCombo("",75,500,60,20,-1,-1)
;~ -------
$topsaat="!!!|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24"
GUICtrlSetData($ptesisaatd1,$topsaat)
GUICtrlSetData($ptesisaatd2,$topsaat)
GUICtrlSetData($ptesisaatd3,$topsaat)
GUICtrlSetData($ptesisaatd4,$topsaat)
GUICtrlSetData($ptesisaatd5,$topsaat)
GUICtrlSetData($ptesisaatd6,$topsaat)
GUICtrlSetData($ptesisaatd7,$topsaat)
GUICtrlSetData($ptesisaatd8,$topsaat)
GUICtrlSetData($ptesisaatd9,$topsaat)
GUICtrlSetData($ptesisaatd10,$topsaat)
GUICtrlSetData($ptesisaatd11,$topsaat)
GUICtrlSetData($ptesisaatd12,$topsaat)
GUICtrlSetData($ptesisaatd13,$topsaat)
GUICtrlSetData($ptesisaatd14,$topsaat)
GUICtrlSetData($ptesisaatd15,$topsaat)
GUICtrlSetData($ptesisaatd16,$topsaat)
;~ -------
$ptesidakikad1 = GUICtrlCreateCombo("",145,50,65,20,-1,-1)
$ptesidakikad2 = GUICtrlCreateCombo("",145,80,65,20,-1,-1)
$ptesidakikad3 = GUICtrlCreateCombo("",145,110,65,20,-1,-1)
$ptesidakikad4 = GUICtrlCreateCombo("",145,140,65,20,-1,-1)
$ptesidakikad5 = GUICtrlCreateCombo("",145,170,65,20,-1,-1)
$ptesidakikad6 = GUICtrlCreateCombo("",145,200,65,20,-1,-1)
$ptesidakikad7 = GUICtrlCreateCombo("",145,230,65,20,-1,-1)
$ptesidakikad8 = GUICtrlCreateCombo("",145,260,65,20,-1,-1)
$ptesidakikad9 = GUICtrlCreateCombo("",145,290,65,20,-1,-1)
$ptesidakikad10 = GUICtrlCreateCombo("",145,320,65,20,-1,-1)
$ptesidakikad11 = GUICtrlCreateCombo("",145,350,65,20,-1,-1)
$ptesidakikad12 = GUICtrlCreateCombo("",145,380,65,20,-1,-1)
$ptesidakikad13 = GUICtrlCreateCombo("",145,410,65,20,-1,-1)
$ptesidakikad14 = GUICtrlCreateCombo("",145,440,65,20,-1,-1)
$ptesidakikad15 = GUICtrlCreateCombo("",145,470,65,20,-1,-1)
$ptesidakikad16 = GUICtrlCreateCombo("",145,500,65,20,-1,-1)
;~ -------
$topdak="!!!|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59"
GUICtrlSetData($ptesidakikad1,$topdak)
GUICtrlSetData($ptesidakikad2,$topdak)
GUICtrlSetData($ptesidakikad3,$topdak)
GUICtrlSetData($ptesidakikad4,$topdak)
GUICtrlSetData($ptesidakikad5,$topdak)
GUICtrlSetData($ptesidakikad6,$topdak)
GUICtrlSetData($ptesidakikad7,$topdak)
GUICtrlSetData($ptesidakikad8,$topdak)
GUICtrlSetData($ptesidakikad9,$topdak)
GUICtrlSetData($ptesidakikad10,$topdak)
GUICtrlSetData($ptesidakikad11,$topdak)
GUICtrlSetData($ptesidakikad12,$topdak)
GUICtrlSetData($ptesidakikad13,$topdak)
GUICtrlSetData($ptesidakikad14,$topdak)
GUICtrlSetData($ptesidakikad15,$topdak)
GUICtrlSetData($ptesidakikad16,$topdak)

;~ -------
$ptesimuzikd1 = GUICtrlCreateCombo("",220,50,90,20,-1,-1)
$ptesimuzikd2 = GUICtrlCreateCombo("",220,80,90,20,-1,-1)
$ptesimuzikd3 = GUICtrlCreateCombo("",220,110,90,20,-1,-1)
$ptesimuzikd4 = GUICtrlCreateCombo("",220,140,90,20,-1,-1)
$ptesimuzikd5 = GUICtrlCreateCombo("",220,170,90,20,-1,-1)
$ptesimuzikd6 = GUICtrlCreateCombo("",220,200,90,20,-1,-1)
$ptesimuzikd7 = GUICtrlCreateCombo("",220,230,90,20,-1,-1)
$ptesimuzikd8 = GUICtrlCreateCombo("",220,260,90,20,-1,-1)
$ptesimuzikd9 = GUICtrlCreateCombo("",220,290,90,20,-1,-1)
$ptesimuzikd10 = GUICtrlCreateCombo("",220,320,90,20,-1,-1)
$ptesimuzikd11 = GUICtrlCreateCombo("",220,350,90,20,-1,-1)
$ptesimuzikd12 = GUICtrlCreateCombo("",220,380,90,20,-1,-1)
$ptesimuzikd13 = GUICtrlCreateCombo("",220,410,90,20,-1,-1)
$ptesimuzikd14 = GUICtrlCreateCombo("",220,440,90,20,-1,-1)
$ptesimuzikd15 = GUICtrlCreateCombo("",220,470,90,20,-1,-1)
$ptesimuzikd16 = GUICtrlCreateCombo("",220,500,90,20,-1,-1)
;~ -------
$topmuz="Müzik Yok|Müzik 1|Müzik 2|Müzik 3|Müzik 4|Müzik 5|Müzik 6|Müzik 7|Müzik 8|Müzik 9|Müzik 10|Müzik 11|Müzik 12|Müzik 13|Müzik 14|Müzik 15|Müzik 16"

GUICtrlSetData($ptesimuzikd1,$topmuz)
GUICtrlSetData($ptesimuzikd2,$topmuz)
GUICtrlSetData($ptesimuzikd3,$topmuz)
GUICtrlSetData($ptesimuzikd4,$topmuz)
GUICtrlSetData($ptesimuzikd5,$topmuz)
GUICtrlSetData($ptesimuzikd6,$topmuz)
GUICtrlSetData($ptesimuzikd7,$topmuz)
GUICtrlSetData($ptesimuzikd8,$topmuz)
GUICtrlSetData($ptesimuzikd9,$topmuz)
GUICtrlSetData($ptesimuzikd10,$topmuz)
GUICtrlSetData($ptesimuzikd11,$topmuz)
GUICtrlSetData($ptesimuzikd12,$topmuz)
GUICtrlSetData($ptesimuzikd13,$topmuz)
GUICtrlSetData($ptesimuzikd14,$topmuz)
GUICtrlSetData($ptesimuzikd15,$topmuz)
GUICtrlSetData($ptesimuzikd16,$topmuz)
;~ -------
$ptesimolad1 = GUICtrlCreateRadio("",324,50,20,20,-1,-1)
$ptesimolad2 = GUICtrlCreateRadio("",324,80,20,20,-1,-1)
$ptesimolad3 = GUICtrlCreateRadio("",324,110,20,20,-1,-1)
$ptesimolad4 = GUICtrlCreateRadio("",324,140,20,20,-1,-1)
$ptesimolad5 = GUICtrlCreateRadio("",324,170,20,20,-1,-1)
$ptesimolad6 = GUICtrlCreateRadio("",324,200,20,20,-1,-1)
$ptesimolad7 = GUICtrlCreateRadio("",324,230,20,20,-1,-1)
$ptesimolad8 = GUICtrlCreateRadio("",324,260,20,20,-1,-1)
$ptesimolad9 = GUICtrlCreateRadio("",324,290,20,20,-1,-1)
$ptesimolad10 = GUICtrlCreateRadio("",324,320,20,20,-1,-1)
$ptesimolad11 = GUICtrlCreateRadio("",324,350,20,20,-1,-1)
$ptesimolad12 = GUICtrlCreateRadio("",324,380,20,20,-1,-1)
$ptesimolad13 = GUICtrlCreateRadio("",324,410,20,20,-1,-1)
$ptesimolad14 = GUICtrlCreateRadio("",324,440,20,20,-1,-1)
$ptesimolad15 = GUICtrlCreateRadio("",324,470,20,20,-1,-1)
$ptesimolad16 = GUICtrlCreateRadio("",324,500,20,20,-1,-1)
$ptesimolayok = GUICtrlCreateRadio("",324,533,20,20,-1,-1)
;~ -------
$kopyalanacak = GUICtrlCreateCombo("",23,534,158,21,-1,-1)
GUICtrlSetData(-1,"P.Tesi|Salı|Çarşamba|Perşembe|Cuma")
$ptesikopyala = GUICtrlCreateButton("Kopyala",222,533,80,22,-1,-1)

GUISetState(@SW_SHOW,$ptesi)

$mod=1 ; 1  : 1 ders 40 dk  2 : 1 ders 80 dk 40.dk de ara zil
$ogretmensure=5 ; öğrenci zilinden 5 dk sonra öğretmen zili çalcak
$ara=40 ;mod 2 ise öğretmen zilinden 40 dk sonra zil çalcak
$ders=80 ; 1 ders kaç dakika


Func ptesid1()
	If $mod=1 Then
		if GUICtrlGetState($ptesimolad1) = 80 then
		;~ 17:55 ogrenci giris 18:00 ogretmen giris 18:40 cikis 18:40~41 seçilen müziği başlat programı 20 dk dondur
		Else
		;~ 17:55 ogrenci giris 18:00 ogretmen giris 18:40 cikis 18:40~41 seçilen müzik
		EndIf
	Else
		if GUICtrlGetState($ptesimolad1) = 80 then
		;~ 17:55 ogrenci giris 18:00 ogretmen giris 18:40 ara 19:20 cikis 19:20~21 seçilen müziği başlat 20 dk dondur
		Else
		;~ 17:55 ogrenci giris 18:00 ogretmen giris 18:40 ara 19:20 cikis 19:20~21 seçilen müzik
		EndIf
	EndIf
EndFunc   ;==>ptesid1

Func ptesid2()
	If $mod=1 Then
		if GUICtrlGetState($ptesimolad2) = 80 then
			;~ 18:50 ogrenci giris 18:55 ogretmen giris 19:35 cikis 19:35~36 seçilen  müziği başlat 20 dk dondur
		Else
			;~ 18:50 ogrenci giris 18:55 ogretmen giris 19:35 cikis 19:35~36 seçilen müzik
		EndIf
	Else
		if GUICtrlGetState($ptesimolad2) = 80 then
		;~ 19:30 ogrenci giris 19:35 ogretmen giris 20:15 ara 20:55 cikis 20:55~56 seçilen müziği başlat 20 dk dondur
		Else
		;~ 19:30 ogrenci giris 19:35 ogretmen giris 20:15 ara 20:55 cikis 20:55~56 seçilen  müzik
		EndIf
	EndIf
EndFunc   ;==>ptesid1

While 1
	if ( GUICtrlRead($ptesisaatd1) = @HOUR And GUICtrlRead($ptesidakikad1) [email protected] And GUICtrlRead($ptesid1) = 1 ) Then
		ptesid1()
	ElseIf ( GUICtrlRead($ptesisaatd2) = @HOUR And GUICtrlRead($ptesidakikad2) [email protected] And GUICtrlRead($ptesid2) = 1 ) Then
		ptesid2()
	ElseIf ( GUICtrlRead($ptesisaatd3) = @HOUR And GUICtrlRead($ptesidakikad3) [email protected] And GUICtrlRead($ptesid3) = 1 ) Then
;~ 		ptesid3()
	ElseIf ( GUICtrlRead($ptesisaatd4) = @HOUR And GUICtrlRead($ptesidakikad4) [email protected] And GUICtrlRead($ptesid4) = 1 ) Then
;~ 		ptesid4()
	ElseIf ( GUICtrlRead($ptesisaatd5) = @HOUR And GUICtrlRead($ptesidakikad5) [email protected] And GUICtrlRead($ptesid5) = 1 ) Then
;~ 		ptesid5()
	ElseIf ( GUICtrlRead($ptesisaatd6) = @HOUR And GUICtrlRead($ptesidakikad6) [email protected] And GUICtrlRead($ptesid6) = 1 ) Then
;~ 		ptesid6()
	ElseIf ( GUICtrlRead($ptesisaatd7) = @HOUR And GUICtrlRead($ptesidakikad7) [email protected] And GUICtrlRead($ptesid7) = 1 ) Then
;~ 		ptesi7()
	ElseIf ( GUICtrlRead($ptesisaatd8) = @HOUR And GUICtrlRead($ptesidakikad8) [email protected] And GUICtrlRead($ptesid8) = 1 ) Then
;~ 		ptesi8()
	ElseIf ( GUICtrlRead($ptesisaatd9) = @HOUR And GUICtrlRead($ptesidakikad9) [email protected] And GUICtrlRead($ptesid9) = 1 ) Then
;~ 		ptesi9()
	ElseIf ( GUICtrlRead($ptesisaatd10) = @HOUR And GUICtrlRead($ptesidakikad10) [email protected] And GUICtrlRead($ptesid10) = 1 ) Then
;~ 		ptesi10()
	ElseIf ( GUICtrlRead($ptesisaatd11) = @HOUR And GUICtrlRead($ptesidakikad11) [email protected] And GUICtrlRead($ptesid11) = 1 ) Then
;~ 		ptesi11()
	ElseIf ( GUICtrlRead($ptesisaatd12) = @HOUR And GUICtrlRead($ptesidakikad12) [email protected] And GUICtrlRead($ptesid12) = 1 ) Then
;~ 		ptesi12()
	ElseIf ( GUICtrlRead($ptesisaatd13) = @HOUR And GUICtrlRead($ptesidakikad13) [email protected] And GUICtrlRead($ptesid13) = 1 ) Then
;~ 		ptesi13()
	ElseIf ( GUICtrlRead($ptesisaatd14) = @HOUR And GUICtrlRead($ptesidakikad14) [email protected] And GUICtrlRead($ptesid14) = 1 ) Then
;~ 		ptesi14()
	ElseIf ( GUICtrlRead($ptesisaatd15) = @HOUR And GUICtrlRead($ptesidakikad15) [email protected] And GUICtrlRead($ptesid15) = 1 ) Then
;~ 		ptesi15()
	ElseIf ( GUICtrlRead($ptesisaatd16) = @HOUR And GUICtrlRead($ptesidakikad16) [email protected] And GUICtrlRead($ptesid16) = 1 ) Then
;~ 		ptesi16()
	EndIf
	
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd

 

 

Edited by FeritEtemSinBin
kodlar düzenlendi

Share this post


Link to post
Share on other sites

autoitte veritabanı bağlantı vs eksiğim çok acces vt ile vb.net ile yaptım kullanici admin , sifre  admin  ücretsiz lisansız isterseniz

data adlı olan uzantısını sildiğim acces dosyası

adodb referanslardan ekleyin acces bağlantısı için

Windows mediaplayer referanslardan ekleyin mp3 leri çalmak için

FrmLogin.vb adında bir form oluşturun kodlar aşağıda

Option Explicit On
Public Class FrmLogin

    Private Sub GiriS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GiriS.Click
        Dim key As String
        On Error GoTo err_Renamed
        Dim no As Short

        BaGlaN()
        rS = cNn.Execute("select count(sn) from giris where (kullanici_adi='" & UseR.Text & "') and (sifre='" & PassworD.Text & "')") 'sayi değişkenine varianta giriş tablosundaki kullanici ad sifre yetki degerlerini tanımladım
        If rS.Fields(0).Value = 0 Then
            MsgBox("Kullanıcı Adı Şifenizi Kontrol Edin!", , "Kullanıcı")
            Exit Sub
        Else
            Me.Hide()
            FrmAjanDa.Show()
        End If

err_Renamed:
    End Sub

    Private Sub password_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles PassworD.KeyPress
        Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
        If KeyAscii = 13 Then Call GiriS_Click(GiriS, New System.EventArgs()) 'enter tuşlanırsa ara butonuna tıkla
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim s As String
        Dim substring As String
        Dim sp() As String

        s = "this \text\ box \contains \value \(08:00-17:41).mp3"
        sp = s.Split("\")

        For Each substring In sp
            TextBox1.Text = substring

        Next

    End Sub

    Private Sub ipTaL_Click(sender As Object, e As EventArgs) Handles ipTaL.Click
        Application.Exit()
    End Sub
End Class

Frm.Ajanda.vb  adında bir form oluşturun kodlar aşağıda

Option Explicit On

Imports WMPLib
Public Class FrmAjanDa
    Dim appPath As String = Application.StartupPath()
    Dim WithEvents Player As New WMPLib.WindowsMediaPlayer
    Private Sub FrmAjanDa_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Application.Exit()
    End Sub

    Private Sub CmdRandevu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdRandevu.Click
        Dim saatS As String

        If ListBox1.SelectedItem IsNot Nothing = False Then
            MsgBox("Zil Sesi Seçin.")
            Exit Sub
        End If
        If ComboBox1.Text <> "" And TextBox2.Text <> "" And TextBox3.Text <> "" Then

            SaatKontrol()
            saatS = TextBox2.Text & ":" & TextBox3.Text
            sQl = "INSERT INTO randevu(adi,tarih,saat) VALUES('" & ListBox1.SelectedItem.ToString & "','" & ComboBox1.Text & "','" & saatS & "')"
            cNn.Execute(sQl)
            rS = Nothing
            MsgBox("Zil Saati Kaydedildi.")
            RanDevuGetir()
            TextBox2.Text = ""
            TextBox3.Text = ""
        Else
            MsgBox("Eksik Bilgi Girişi.")
        End If

    End Sub

    Private Sub TextBox2_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
        Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
        If Not rakam(KeyAscii) Then KeyAscii = 0
        eventArgs.KeyChar = Chr(KeyAscii)
        If KeyAscii = 0 Then
            eventArgs.Handled = True
        End If

    End Sub
    Private Sub SaatKontrol()
        If TextBox2.Text = "1" Then TextBox2.Text = "01"
        If TextBox2.Text = "2" Then TextBox2.Text = "02"
        If TextBox2.Text = "3" Then TextBox2.Text = "03"
        If TextBox2.Text = "4" Then TextBox2.Text = "04"
        If TextBox2.Text = "5" Then TextBox2.Text = "05"
        If TextBox2.Text = "6" Then TextBox2.Text = "06"
        If TextBox2.Text = "7" Then TextBox2.Text = "07"
        If TextBox2.Text = "8" Then TextBox2.Text = "08"
        If TextBox2.Text = "9" Then TextBox2.Text = "09"
        If TextBox3.Text = "1" Then TextBox3.Text = "01"
        If TextBox3.Text = "2" Then TextBox3.Text = "02"
        If TextBox3.Text = "3" Then TextBox3.Text = "03"
        If TextBox3.Text = "4" Then TextBox3.Text = "04"
        If TextBox3.Text = "5" Then TextBox3.Text = "05"
        If TextBox3.Text = "6" Then TextBox3.Text = "06"
        If TextBox3.Text = "7" Then TextBox3.Text = "07"
        If TextBox3.Text = "8" Then TextBox3.Text = "08"
        If TextBox3.Text = "9" Then TextBox3.Text = "09"
    End Sub
    Private Sub TextBox1_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs)
        Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
        Call buyut(KeyAscii)
        eventArgs.KeyChar = Chr(KeyAscii)
        If KeyAscii = 0 Then
            eventArgs.Handled = True
        End If
    End Sub

    Private Sub List1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List1.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            'MsgBox("The X Position is " & xPos & " The Y Position is " & yPos)
            If List1.FocusedItem.Selected Then
                i = List1.FocusedItem.Index
                If MsgBox(List1.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List1.FocusedItem.SubItems(2).Text & ")")
                'List1.Items(i).Remove()
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List2.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List2.FocusedItem.Selected Then
                i = List2.FocusedItem.Index
                If MsgBox(List2.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List2.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List3.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List3.FocusedItem.Selected Then
                i = List3.FocusedItem.Index
                If MsgBox(List3.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List3.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List4_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List4.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List4.FocusedItem.Selected Then
                i = List4.FocusedItem.Index
                If MsgBox(List4.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List4.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List5_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List5.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List5.FocusedItem.Selected Then
                i = List5.FocusedItem.Index
                If MsgBox(List5.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List5.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List6_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List6.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List6.FocusedItem.Selected Then
                i = List6.FocusedItem.Index
                If MsgBox(List6.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List6.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub
    Private Sub List7_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles List7.MouseDown
        Dim xPos As Integer, yPos As Integer, i As Integer
        If e.Button = MouseButtons.Right Then
            xPos = e.X
            yPos = e.Y
            If List7.FocusedItem.Selected Then
                i = List7.FocusedItem.Index
                If MsgBox(List7.Items(i).SubItems(1).Text & " Zil iptal edilecek. Emin misiniz?", vbApplicationModal + vbYesNo + vbQuestion) = vbNo Then Exit Sub
                cNn.Execute("DELETE FROM randevu WHERE (sn =" & List7.FocusedItem.SubItems(2).Text & ")")
                RanDevuGetir()
            End If
        End If
    End Sub

    Private Sub FrmAjanDa_Load(sender As Object, e As EventArgs) Handles Me.Load
        RanDevuGetir()
        ListFiles()
        Button2.Text = "||"
        Button1.Text = "|>"

        Label11.Text = Format(Now, "HH:mm:ss")
        Label12.Text = Format(Now, "dddd")
        Label13.Text = Format(Now, "dd.MM.yyyy")


    End Sub

    Private Sub ListFiles()
        Dim folderPath As String
        ListBox1.Items.Clear()
        folderPath = appPath.ToString & "\Mp3\"
        Dim fileNames = My.Computer.FileSystem.GetFiles(
            folderPath, FileIO.SearchOption.SearchTopLevelOnly, "*.mp3")

        For Each fileName As String In fileNames
            ListBox1.Items.Add(fileName)
        Next
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If ListBox1.SelectedItem IsNot Nothing = False Then
            MsgBox("Zil Sesi Seçin.")
            Exit Sub
        End If
        Player.URL = ListBox1.SelectedItem.ToString
        Player.controls.play()
        'Player.controls.play()

    End Sub



    Sub Deve()
        Dim i As Integer
        If Label12.Text = "Pazartesi" Then
            For i = 0 To List1.Items.Count - 1
                If List1.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List1.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Salı" Then
            For i = 0 To List2.Items.Count - 1
                If List2.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List2.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Çarşamba" Then
            For i = 0 To List3.Items.Count - 1
                If List3.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List3.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Perşembe" Then
            For i = 0 To List4.Items.Count - 1
                If List4.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List4.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Cuma" Then
            For i = 0 To List5.Items.Count - 1
                If List5.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List5.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Cumartesi" Then
            For i = 0 To List6.Items.Count - 1
                If List6.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List6.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
        If Label12.Text = "Pazar" Then
            For i = 0 To List7.Items.Count - 1
                If List7.Items(i).SubItems(0).Text & ":00" = Label11.Text Then
                    Player.URL = List7.Items(i).SubItems(1).Text
                    Player.controls.play()
                End If
            Next
        End If
    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

        Timer1.Interval = 1000

        Label11.Text = Format(Now, "HH:mm:ss")
        Label12.Text = Format(Now, "dddd")
        Label13.Text = Format(Now, "dd.MM.yyyy")
        Deve()

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Player.controls.stop()
    End Sub
End Class

ayar.vb adında bir modül oluşturun kodlar aşağıda

Option Explicit On
Imports System.Timers

Module ayar
    Public cNn As New ADODB.Connection
    Public rS As New ADODB.Recordset
    Public cnNStr As String
    Public sQl As String
    Public LiSanS As String
    Public dataLisans As String
    Public pIccLisasns As String
    Public BlnDemo As Boolean
    Public BlnTC As Boolean
    Public BlnHasta As Boolean
    Public blnHasT As Boolean
    Public RtaRiH As String
    Public HastaAdi As String
    Public ListeM As String

    Public Sub BaGlaN()
        If cNn.State = 1 Then cNn.Close()
        cnNStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data;User ID=Admin;Jet OLEDB:Database;"
        cNn.Open(cnNStr)
    End Sub

    Public Sub buyut(ByRef tus As Short)

        '-------türkçe karakterler için küçükten büyük harfe----------------------
        If (tus = 231) Then tus = 199 ' Ç harfi
        If (tus = 253) Then tus = 73 ' I harfi
        If (tus = 105) Then tus = 221 ' İ harfi
        If (tus = 254) Then tus = 222 ' Ş harfi
        If (tus = 240) Then tus = 208 ' Ğ harfi
        If (tus = 252) Then tus = 220 ' Ü harfi
        If (tus = 246) Then
            tus = 214 ' Ö harfi
            Exit Sub
        ElseIf tus >= 97 And tus <= 122 Then  'Diğer karakterler
            tus = tus - 32
        End If
    End Sub

    Public Function rakam(ByRef KeyAscii As Short) As Boolean
        If KeyAscii <> 44 And KeyAscii <> 8 And KeyAscii < 48 Or KeyAscii > 57 Then ' delete ve numara ve enter değilse
            rakam = False
        Else
            rakam = True
        End If
    End Function

    Public Sub RanDevuGetir()
        FrmAjanDa.List1.Items.Clear()
        FrmAjanDa.List2.Items.Clear()
        FrmAjanDa.List3.Items.Clear()
        FrmAjanDa.List4.Items.Clear()
        FrmAjanDa.List5.Items.Clear()
        FrmAjanDa.List6.Items.Clear()
        FrmAjanDa.List7.Items.Clear()
        RtaRiH = "PAZARTESİ"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List1.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)

                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List1.Items.Count > 0 Then
            FrmAjanDa.List1.Enabled = True
        Else
            FrmAjanDa.List1.Enabled = False
        End If
        '2. liste
        RtaRiH = "SALI"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List2.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List2.Items.Count > 0 Then
            FrmAjanDa.List2.Enabled = True
        Else
            FrmAjanDa.List2.Enabled = False
        End If
        '3. liste
        RtaRiH = "ÇARŞAMBA"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List3.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List3.Items.Count > 0 Then
            FrmAjanDa.List3.Enabled = True
        Else
            FrmAjanDa.List3.Enabled = False
        End If
        '4. liste
        RtaRiH = "PERŞEMBE"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List4.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List4.Items.Count > 0 Then
            FrmAjanDa.List4.Enabled = True
        Else
            FrmAjanDa.List4.Enabled = False
        End If
        '5. liste
        RtaRiH = "CUMA"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List5.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List5.Items.Count > 0 Then
            FrmAjanDa.List5.Enabled = True
        Else
            FrmAjanDa.List5.Enabled = False
        End If
        '6. liste
        RtaRiH = "CUMARTESİ"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List6.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List6.Items.Count > 0 Then
            FrmAjanDa.List6.Enabled = True
        Else
            FrmAjanDa.List6.Enabled = False
        End If
        '7. liste
        RtaRiH = "PAZAR"
        rS = cNn.Execute("SELECT * FROM randevu WHERE tarih='" & RtaRiH & "' ORDER BY saat ASC")
        Do Until rS.EOF
            With FrmAjanDa.List7.Items.Add(rS(3).Value)
                If Not IsDBNull(rS(1).Value) Then .SubItems.Add(rS(1).Value)
                .SubItems.Add(rS(0).Value)
            End With
            rS.MoveNext()
        Loop
        rS = Nothing
        If FrmAjanDa.List7.Items.Count > 0 Then
            FrmAjanDa.List7.Enabled = True
        Else
            FrmAjanDa.List7.Enabled = False
        End If
    End Sub

End Module

 

OkulZilProgrami.exe

içinde şimdi farkettim ajanda programı yapmıştım ondan kalan gereksiz bir kaç değişken kalmış sorun olmaz istersen silebilirsin. Bunu da sırf bu başlığı gördüm baktım webde bir çok uygulama var paralı bende ücretsizini yapayım eğitime katkım olsun dedim :) Okuyan 3 tane evladım olunca İyi günler İyi çalışmalar Tnctr ailesi

Ayrıca zil sesi olarak atanacak mp3 ler kurulduğu dizinde mp3 klasörüne atılmalı otomatik olarak görecektir.

Ekran Alıntısı.PNG

Ekran Alıntısı1.PNG

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×