PROJE BANA AİT DEĞİLDİR.
Gerekenler
3 Adet Listbox [Name : Cmb(0) , lst(0) , lst(1) ]
1 Adet Text [Name : txt(0)]
1 Adet CommandButton [Name : btn(0)]
1 Adet Label [Name : lbl(0)]
1 Adet Timer [İnvertal : 7000 , Enable : true]
1 Adet Module
Form Kodu
Module Kodu :
Yapamayanlar için Source: Dosya.tc - cretsiz, Hzl ve Kolay Dosya Paylam
Gerekenler
3 Adet Listbox [Name : Cmb(0) , lst(0) , lst(1) ]
1 Adet Text [Name : txt(0)]
1 Adet CommandButton [Name : btn(0)]
1 Adet Label [Name : lbl(0)]
1 Adet Timer [İnvertal : 7000 , Enable : true]
1 Adet Module
Form Kodu
Kod:
Dim TrayNid As NOTIFYICONDATA
Private Sub btn_Click(Index As Integer)
Select Case Index
Case 0
If Lst(0).Text <> "" And Lst(0).Text <> "Program Manager" Then
Degistirici Lst(0).Text, Txt(0).Text
cmb(0).Text = "Pencereleri Yenile"
Else
MsgBox "1. listeden isim seçiniz. (Program Manager) Hariç !"
End If
End Select
End Sub
Private Sub cmb_Click(Index As Integer)
Select Case Index
Case 0
If cmb(0).Text = "Pencereleri Yenile" Then
List1Handle = FillTaskListBox(Lst(0))
End If
If cmb(0).Text = "Nasıl Çalışır ?" Then
MsgBox "Yenile ile açık programları listeye aktarır. Program üzerinde istediğiniz pencereyi gizleyebilirsiniz." & vbNewLine _
& "1. listede çift tıkladığınız pencereyi gizler. 2. listeye aktarır." & vbNewLine _
& "2. listede gizlenmiş pencereler bulunmaktadır. Çift tıklama ile gösterilir." & vbNewLine _
& vbNewLine _
& "CaN"
End If
If cmb(0).Text = "Program Gizle" Then
TrayMode
End If
End Select
End Sub
Private Sub Form_Load()
GizleME "CaN", "1"
OnTopBaby Me.hwnd, True
cmb(0).Text = "Pencereleri Yenile"
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Trayislem As Long
Trayislem = x / Screen.TwipsPerPixelX
Select Case Trayislem
Case &H201
Me.Show
Shell_NotifyIcon 2, TrayNid
Case &H202
Case &H203
Case &H204
Case &H205
Case &H206
End Select
End Sub
Private Sub TrayMode()
Form1.Hide
With TrayNid
.cbSize = Len(TrayNid)
.hwnd = Form1.hwnd
.uId = vbNull
.uFlags = &H2 Or &H4 Or &H1
.uCallBackMessage = &H200
.hIcon = Form1.Icon
.szTip = Form1.Caption & vbNullChar
End With
Shell_NotifyIcon &H0, TrayNid
End Sub
Private Sub Lbl_Click(Index As Integer)
Select Case Index
Case 1
MsgBox "Program CaN tarafından kodlanmıştır.." & vbNewLine _
& vbNewLine _
& "İletişim: [email protected]"
End Select
End Sub
Private Sub Lst_DblClick(Index As Integer)
Select Case Index
Case 0
If Lst(0).Text = "Program Manager" Then
MsgBox "( Program Manager ) gizlenemez.."
Else
GizleME Lst(0), "1"
Lst(1).AddItem Lst(0).Text
Lbl(0) = Lst(0).Text & " Gizlendi.."
Lst(0).RemoveItem (Lst(0).ListIndex)
End If
Case 1
GizleME Lst(1), "0"
Lst(0).AddItem Lst(1).Text
Lbl(0) = Lst(1).Text & " Gözüküyor.."
Lst(1).RemoveItem (Lst(1).ListIndex)
End Select
End Sub
Private Sub Timer1_Timer()
List1Handle = FillTaskListBox(Lst(0))
End Sub
Kod:
Public Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pTrayNid As NOTIFYICONDATA) As Boolean
Public Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Public TrayNid As NOTIFYICONDATA
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Public Function FillTaskListBox(Lst As ListBox) As Long
Lst.Clear
Call EnumWindows(AddressOf EnumWindowsProc, Lst.hwnd)
FillTaskListBox = Lst.ListCount
End Function
Private Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Static WindowText As String
Static nRet As Long
If IsWindowVisible(hwnd) Then
If GetParent(hwnd) = 0 Then
If GetWindowLong(hwnd, (-8)) = 0 Then
WindowText = Space$(256)
nRet = GetWindowText(hwnd, WindowText, Len(WindowText))
If nRet Then
WindowText = Left$(WindowText, nRet)
nRet = SendMessage(lParam, &H180, 0, ByVal WindowText)
Call SendMessage(lParam, &H19A, nRet, ByVal hwnd)
End If
End If
End If
End If
EnumWindowsProc = True
End Function
Public Function GizleME(isim, goster)
If goster = "0" Then HideMe = ShowWindow(FindWindow(vbNullString, isim), 5)
If goster = "1" Then ShowME = ShowWindow(FindWindow(vbNullString, isim), 0)
End Function
Public Function OnTopBaby(hwnd As Long, Topmost As Boolean) As Long
If Topmost = True Then
OnTopBaby = SetWindowPos(hwnd, -1, 0, 0, 0, 0, 1 Or 2)
Else
OnTopBaby = SetWindowPos(hwnd, -2, 0, 0, 0, 0, 1 Or 2)
OnTopBaby = False
End If
End Function
Public Function Degistirici(Eski, Yeni)
HandLeBaby = FindWindow(vbNullString, Eski)
If HandLeBaby = 0 Then
MsgBox Eski & " Bulunamadı. Uygulama Başlığını Doğru Girdiğinizden Emin Olunuz!"
End If
Call SetWindowText(HandLeBaby, Yeni)
End Function
Yapamayanlar için Source: Dosya.tc - cretsiz, Hzl ve Kolay Dosya Paylam
Son düzenleme:


