Sayfalar
25 Nisan 2016 Pazartesi
EKRANI ve GÖREV YÖNETİCİ MENÜSÜNÜ KİLİTLEME PROJE KODLARI
NOT:
Win 10 için geçerlidir
EKRANI KİLİTLEME PROJE KODLARI _
(V1.0.16)
İNDİR
SADECE
EXE
PROGRAMI
İNDİR
Win 7 için örnek
EKRAN KALKANI-KOD
İNDİR
9 Nisan 2016 Cumartesi
ÇOKLU ALARM ÖRNEK PROJESİ
ÇOKLU ALARM PROJE KODLARI
İNDİR
Public Class Form1 Dim AlarmCal As Boolean = False Dim TimerAyarla As Boolean = False Dim eylemSuresi As Byte = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim xDizi As String Timer1.Enabled = True Timer2.Enabled = True ' Menüleri Boşalt alarm_Cmb1A.Items.Add("") alarm_Cmb2A.Items.Add("") alarm_Cmb3A.Items.Add("") alarm_Cmb1B.Items.Add("") alarm_Cmb2B.Items.Add("") alarm_Cmb3B.Items.Add("") 'Saat Bölümünü doldur For n As Byte = 0 To 23 xDizi = n IKI(xDizi) alarm_Cmb1A.Items.Add(xDizi) alarm_Cmb2A.Items.Add(xDizi) alarm_Cmb3A.Items.Add(xDizi) Next 'Dakika Bölümünü doldur For n As Byte = 0 To 59 xDizi = n IKI(xDizi) alarm_Cmb1B.Items.Add(xDizi) alarm_Cmb2B.Items.Add(xDizi) alarm_Cmb3B.Items.Add(xDizi) Next End Sub Private Sub Form1_Closing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Dim SesliUyar As Boolean = False If alarm_Cmb1A.Text <> "" And alarm_Cmb1B.Text <> "" Then SesliUyar = True If alarm_Cmb2A.Text <> "" And alarm_Cmb2B.Text <> "" Then SesliUyar = True If alarm_Cmb3A.Text <> "" And alarm_Cmb3B.Text <> "" Then SesliUyar = True If timer_LblKronometre.Text <> "00:00" Then SesliUyar = True If SesliUyar = True Then If MsgBox("Çıkmak istediğinizden emin misiniz?", _ MsgBoxStyle.YesNo, "Çoklu Alarm Uyarısı") = MsgBoxResult.No Then e.Cancel = True End If End If End Sub Private Sub TimerButonları(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles timer_Btn10.Click, timer_Btn5.Click, timer_Btn1.Click, timer_BtnBASLAT.Click Dim Btn_Text As Control = CType(sender, Control) Dim Ekle As Byte Dim Basamak As String Select Case Btn_Text.Text Case "+1" Ekle = 1 Case "+5" Ekle = 5 Case "+10" Ekle = 10 Case "Başla" timer_BtnBASLAT.Text = "Sıfırla" timer_BtnBASLAT.ForeColor = Color.Red TimerAyarla = True timer_LblKronometre.Enabled = True Exit Sub Case "Sıfırla" timer_BtnBASLAT.ForeColor = SystemColors.ControlText timer_BtnBASLAT.Text = "Başla" timer_BtnBASLAT.Enabled = False timer_LblKronometre.Enabled = False TimerAyarla = False timer_LblKronometre.Text = "00:00" Exit Sub End Select timer_BtnBASLAT.Enabled = True 'TIMER için 1, 5 veya 10 dakika ekle Basamak = Mid(timer_LblKronometre.Text, 1, 2) + Ekle IKI(Basamak) 'iki basamaktaki sayı 99 dan büyükse çık 'iki basamaklı sayıyı hatırla If Basamak > 99 Then Exit Sub 'Değişiklikleri uygula timer_LblKronometre.Text = Basamak & ":" & Mid(timer_LblKronometre.Text, 4, 5) End Sub Private Sub btnDUR_Click(sender As System.Object, e As System.EventArgs) Handles btnDUR.Click AlarmSesi("Dur") btnDUR.BackColor = SystemColors.Control btnDUR.ForeColor = SystemColors.ControlText End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'ALARM CODE Dim SaatBLM As String = DateTime.Now.Hour 'Saat Dim DakikaBLM As String = DateTime.Now.Minute 'Dakika Dim SaniyeBLM As String = DateTime.Now.Second 'Saniye Bölümü IKI(SaatBLM) IKI(DakikaBLM) IKI(SaniyeBLM) SaatLbl.Text = SaatBLM & ":" & DakikaBLM & ":" & SaniyeBLM If alarm_Cmb1A.Text = SaatBLM _ And alarm_Cmb1B.Text = DakikaBLM _ And SaniyeBLM = "00" Then AlarmSesi("Başla") End If If alarm_Cmb2A.Text = SaatBLM _ And alarm_Cmb2B.Text = DakikaBLM _ And SaniyeBLM = "00" Then AlarmSesi("Başla") End If If alarm_Cmb3A.Text = SaatBLM _ And alarm_Cmb3B.Text = DakikaBLM _ And SaniyeBLM = "00" Then AlarmSesi("Başla") End If 'TIMER KODLARI If TimerAyarla = True Then If timer_LblKronometre.Text = "00:00" Then TimerAyarla = False timer_BtnBASLAT.Text = "Başla" timer_BtnBASLAT.Enabled = False timer_LblKronometre.Enabled = False AlarmSesi("Başla") Exit Sub End If If Mid(timer_LblKronometre.Text, 4, 5) <> "00" Then Dim SecilenKrnm As String = Mid(timer_LblKronometre.Text, 4, 5) - 1 IKI(SecilenKrnm) timer_LblKronometre.Text = Mid(timer_LblKronometre.Text, 1, 2) & ":" & SecilenKrnm Else Dim Basamak As String = Mid(timer_LblKronometre.Text, 1, 2) - 1 IKI(Basamak) timer_LblKronometre.Text = Basamak & ":" & "59" End If End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If AlarmCal = True Then My.Computer.Audio.Play(My.Resources.BipBip, AudioPlayMode.Background) eylemSuresi += 1 End If If eylemSuresi > 15 Then Timer2.Interval = 200 End If If eylemSuresi > 215 Then AlarmSesi("Dur") btnDUR.BackColor = SystemColors.Control btnDUR.ForeColor = SystemColors.ControlText End If End Sub Private Sub AlarmSesi(ByVal eylem) Select Case eylem Case "Başla" AlarmCal = True btnDUR.Enabled = True btnDUR.BackColor = Color.Red btnDUR.ForeColor = Color.White Case ("Dur") AlarmCal = False btnDUR.Enabled = False btnDUR.BackColor = SystemColors.Control btnDUR.ForeColor = SystemColors.ControlText eylemSuresi = 0 Timer2.Interval = 1000 End Select End Sub Private Sub IKI(ByRef deger) If deger < 10 Then deger = "0" & deger End If End Sub End Class
SON ÇALIŞILAN DOSYALAR
SON ÇALIŞILAN DOSYALARI GÖRME,ÇALIŞTIRMA.SİLME PROJESİ
İNDİR
Imports System.IO, System.Diagnostics, System.ComponentModel Public Class Form1 Dim SonCalDsyKlasoru As String = Environment.GetFolderPath(Environment.SpecialFolder.Recent) Private Property eleman As ListViewItem Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load SCDsyGosterBtn.PerformClick() End Sub Private Sub SCDsyGosterBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SCDsyGosterBtn.Click ListView1.Items.Clear() Dim lstitem As New ListViewItem() imageList1.Images.Clear() For Each SonCalDsy In Directory.GetFiles(SonCalDsyKlasoru) Dim yol As String yol = Path.GetFileNameWithoutExtension(SonCalDsy) imageList1.Images.Add(SonCalDsy, Icon.ExtractAssociatedIcon(SonCalDsy)) 'Dosya adı ve ikonu lstitem = ListView1.Items.Add(Path.GetFileNameWithoutExtension(SonCalDsy), SonCalDsy) lstitem.SubItems.Add(New FileInfo(SonCalDsy).CreationTime.ToLongDateString()) 'Tarih ToLongDateString lstitem.SubItems.Add(SonCalDsy) 'yol ekle Next End Sub Private Sub ListView1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick Try Process.Start(TextBox1.Text) Catch m As Win32Exception End Try End Sub Private Sub openToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcTSm.Click, DosyaAçTSmn.Click ListView1_DoubleClick(sender, e) End Sub Private Sub openLocationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DsyKlsAcTsm.Click, DsyKlsAçTsmn.Click Process.Start(SonCalDsyKlasoru) End Sub Private Sub TumSilTsm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TumSilTsm.Click For Each TumCalDsy In Directory.GetFiles(SonCalDsyKlasoru) File.Delete(TumCalDsy) Next ListView1.Items.Clear() End Sub Dim DosyaSil As String Private Sub SecilSilTsm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SecilSilTsm.Click For Each selected In ListView1.SelectedItems DosyaSil = selected.ToString.Remove(0, selected.ToString.IndexOf("{") + 1).Replace("}", "") File.Delete(DosyaSil) ListView1.Items.RemoveByKey(DosyaSil) Next End Sub Private Sub SilTsm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SilTsm.Click File.Delete(ListView1.SelectedItems(0).Text) ListView1.Items.RemoveByKey(ListView1.SelectedItems(0).Text) End Sub Private Sub ListView1_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then If (ListView1.SelectedItems.Count > 0) Then 'contextMenuStrip3.Show(ListView1, 0, -50) contextMenuStrip1.Show(ListView1, ListView1.SelectedItems(0).Position.X + 20, ListView1.SelectedItems(0).Position.Y + 20) End If End If End Sub Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged Dim sayi As Integer = ListView1.Items.Count Dim eleman As ListViewItem For i As Integer = 0 To sayi - 1 eleman = ListView1.Items(i) If eleman.Selected Then Label1.Text = ListView1.Items(i).SubItems(0).Text TextBox1.Text = ListView1.Items(i).SubItems(2).Text End If Next End Sub #Region " ESC İLE KAPATMA, DELETE İLE SATIR SİLME...." Private Sub ListView1_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles ListView1.KeyDown If e.KeyCode = Keys.Delete Then Call ListedenSatırSil() End If If e.KeyCode = Keys.Escape Then Me.Close() End If End Sub Public Sub ListedenSatırSil() On Error Resume Next Dim indeksler As ListView.SelectedIndexCollection = ListView1.SelectedIndices Dim index As Integer TextBox1.Text = Nothing For Each index In indeksler ListView1.Items.RemoveAt(index) Next If index = 0 Then index = 0 index = index - 1 If index = -1 Then index = 0 eleman = ListView1.Items(index) eleman.Selected = True ListView1.Focus() End Sub #End Region Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim yol As String = Application.StartupPath & "\zzz" Try For Each file As IO.FileInfo In New IO.DirectoryInfo(yol).GetFiles("*.txt") If (Now - file.CreationTime).Days < 7 Then file.Delete() Next MsgBox(yol & " *.TXT Dosyaları silindi") Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub End Class
Daha Yeni Kayıtlar
Önceki Kayıtlar
Ana Sayfa
Kaydol:
Kayıtlar (Atom)