6 Nisan 2013 Cumartesi
SÜRÜCÜ İKONUNU DEĞİŞTİRMEK
SÜRÜCÜ İKONUNU DEĞİŞTİRME
KOD
veya
EXE
indir
Public Class Form1 Public Class Form1 Public Frm2_Kapalı As Boolean = False #Region " windows mesajı ve Form Taşı" Const TEST_ET As Integer = &H84 Const YAKALA As Integer = &H1 Const BASLIK As Integer = &H2 Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Select Case m.Msg Case TEST_ET MyBase.WndProc(m) If m.Result = YAKALA Then m.Result = BASLIK Case Else MyBase.WndProc(m) End Select End Sub #End Region Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox1.Text = "" Then Beep() Label4.Text = "" Label4.Text = "Bir simge seçiniz." Timer1.Interval = 75 Timer1.Start() Exit Sub End If If ComboBox1.SelectedItem = "" Then Beep() Timer1.Interval = 75 Timer1.Start() Label4.Text = "Bir sürücü harfi seçiniz." Exit Sub Else My.Computer.Registry.CurrentUser.CreateSubKey("Software\\Classes\\Applications\\Explorer.exe\\Drives" & "\\" & ComboBox1.SelectedItem & "\\" & "DefaultIcon") My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Classes\Applications\Explorer.exe\Drives\" & ComboBox1.SelectedItem & "\" & "DefaultIcon", "", TextBox1.Text, Microsoft.Win32.RegistryValueKind.String) Beep() Label4.Text = "Simge başarıyla değiştirildi!" Timer1.Interval = 75 Timer1.Start() Button1.Enabled = True End If End Sub Private Sub PictureBox2_Click(sender As System.Object, e As System.EventArgs) Handles DsyAçPic.Click OpenFileDialog1.ShowDialog() TextBox1.Text = OpenFileDialog1.FileName End Sub Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick Label4.Visible = True Timer1.Interval = Timer1.Interval - 1 If Timer1.Interval = 1 Then Label4.Visible = False : Timer1.Stop() End Sub Private Sub Form1_Move(sender As System.Object, e As System.EventArgs) Handles MyBase.Move If Frm2_Kapalı = False Then Exit Sub Form2.Top = Me.Top + 23 Form2.Left = Me.Left + Me.Width Form2.Show() End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Frm2_Kapalı = False NotifyIcon1.Visible = True End Sub Private Sub KapatPic_Click(sender As System.Object, e As System.EventArgs) Handles KapatPic.Click Me.Close() End Sub Private Sub KapatPic_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles KapatPic.MouseMove KapatPic.Image = ImKapat.Images("kapat_R-23x23.png") End Sub Private Sub KapatPic_MouseLeave(sender As System.Object, e As System.EventArgs) Handles KapatPic.MouseLeave KapatPic.Image = ImKapat.Images("kapat_G-23x23.png") End Sub Private Sub YardımLbl_Click(sender As System.Object, e As System.EventArgs) Handles YardımLbl.Click If Frm2_Kapalı = True Then Frm2_Kapalı = False Form2.Close() Else Frm2_Kapalı = True 'Gösteriliyor Form2.Show() End If End Sub Private Sub YardımLbl_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles YardımLbl.MouseMove YardımLbl.ForeColor = Color.Lime End Sub Private Sub YardımLbl_MouseLeave(sender As System.Object, e As System.EventArgs) Handles YardımLbl.MouseLeave YardımLbl.ForeColor = Color.White End Sub Private Sub MinimizePic_Click(sender As System.Object, e As System.EventArgs) End Sub Private Sub NotifyIcon1_MouseClick(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseClick If Me.Visible Then Me.Hide() If Frm2_Kapalı = True Then Form2.Close() Else Me.Show() Me.WindowState = FormWindowState.Normal Me.StartPosition = FormStartPosition.CenterScreen End If End Sub Private Sub Form1_Resize(sender As System.Object, e As System.EventArgs) Handles MyBase.Resize If Me.WindowState = FormWindowState.Minimized Then Me.Visible = False Exit Sub End If End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click System.Diagnostics.Process.Start("Explorer", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") End Sub Private Sub Button1_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseMove Label4.Visible = True Label4.Text = "İkonu değişecek Klasörü Aç" End Sub Private Sub Button1_MouseLeave(sender As System.Object, e As System.EventArgs) Handles Button1.MouseLeave Label4.Visible = False Label4.Text = "" End Sub End Class
fORM2
Public Class Form2 #Region "FORM OLAYLARI.." Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.Top = Form1.Top + 23 Me.Left = Form1.Left + Form1.Width End Sub Private Sub KapaPic_Click(sender As System.Object, e As System.EventArgs) Handles KapaPic.Click Form1.Frm2_Kapalı = False Me.Close() End Sub #End Region End Class
Sonraki Kayıt
Önceki Kayıt
Ana Sayfa