*Sitemize Üye Olunca Elinize Ne Geçer?

<--- 1. Üye Olarak Linkleri Görebilirsiniz... --->

<--- 2. İstediğiniz Kadar Paylaşım Yapabilirsiniz... --->

<--- 3. Güzel Bir Forum Hayatı Yaşayabilirsiniz... --->


Join the forum, it's quick and easy


*Sitemize Üye Olunca Elinize Ne Geçer?

<--- 1. Üye Olarak Linkleri Görebilirsiniz... --->

<--- 2. İstediğiniz Kadar Paylaşım Yapabilirsiniz... --->

<--- 3. Güzel Bir Forum Hayatı Yaşayabilirsiniz... --->

Would you like to react to this message? Create an account in a few clicks or log in to continue.

● En Güncel Paylaşım Platformu ●

---Misafir--- Hos Geldiniz Daha iyi Bir Hizmet İçin Üye olunuz.ÜyeLer Link GörebiLir

    Vb Kod Hangi Programlar Çalışıyo Gör

    MnyTirith
    MnyTirith
    ● Admin ●
    ● Admin ●


    <b>Doğum tarihi</b> Doğum tarihi : 20/06/90

    Vb Kod Hangi Programlar Çalışıyo Gör Empty Vb Kod Hangi Programlar Çalışıyo Gör

    Mesaj tarafından MnyTirith Cuma Mart 12, 2010 9:39 pm

    'Çalışan programları listelemek;
    ' 1 adet listbox ve 1 adet timer nesnesi ekleyin ve timer'ın intervalini 100 yapın
    'Kodları olduğu gibi kopyalayın




    Option Explicit

    'WIN16/32 Directive
    #If Win16 Then
    Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer, ByVal flgs As Integer) As Integer
    Declare Function GetWindow Lib "User" (ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer
    Declare Function GetWindowWord Lib "User" (ByVal hWnd As Integer, ByVal wIndx As Integer) As Integer
    Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal wIndx As Integer) As Long
    Declare Function GetWindowText Lib "User" (ByVal hWnd As Integer, ByVal lpSting As String, ByVal nMaxCount As Integer) As Integer
    Declare Function GetWindowTextLength Lib "User" (ByVal hWnd As Integer) As Integer
    Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal insaft As Integer, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal flgs As Integer) As Integer
    #Else
    Private Declare Function ShowWindow Lib "User32" (ByVal hWnd As Long, ByVal flgs As Long) As Long
    Private Declare Function GetWindow Lib "User32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
    Private Declare Function GetWindowWord Lib "User32" (ByVal hWnd As Long, ByVal wIndx As Long) As Long
    Private Declare Function GetWindowLong Lib "User32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal wIndx As Long) As Long
    Private Declare Function GetWindowText Lib "User32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpSting As String, ByVal nMaxCount As Long) As Long
    Private Declare Function GetWindowTextLength Lib "User32" Alias "GetWindowTextLengthA" (ByVal hWnd As Long) As Long
    Private Declare Function SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal insaft As Long, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal flgs As Long) As Long
    #End If

    Const WS_MINIMIZE = &H20000000 ' Style bit 'is minimized'
    Const HWND_TOP = 0 ' Move to top of z-order
    Const SWP_NOSIZE = &H1 ' Do not re-size window
    Const SWP_NOMOVE = &H2 ' Do not reposition window
    Const SWP_SHOWWINDOW = &H40 ' Make window visible/active
    Const GW_HWNDFIRST = 0 ' Get first Window handle
    Const GW_HWNDNEXT = 2 ' Get next window handle
    Const GWL_STYLE = (-16) ' Get Window's style bits
    Const SW_RESTORE = 9 ' Restore window
    Dim IsTask As Long ' Style bits for normal task

    ' The following bits will be combined to define properties
    ' of a 'normal' task top-level window. Any window with ' these set will be
    ' included in the list:
    Const WS_VISIBLE = &H10000000 ' Window is not hidden
    Const WS_BORDER = &H800000 ' Window has a border

    ' Other bits that are normally set include:
    Const WS_CLIPSIBLINGS = &H4000000 ' can clip windows
    Const WS_THICKFRAME = &H40000 ' Window has thick border
    Const WS_GROUP = 131072 ' Window is top of group
    Const WS_TABSTOP = &H10000 ' Window has tabstop

    Private Sub Form_Load()
    IsTask = WS_VISIBLE Or WS_BORDER ' Define bits for normal task
    ' Update list
    End Sub
    Function TaskWindow(hwCurr As Long) As Long
    Dim lngStyle As Long
    lngStyle = GetWindowLong(hwCurr, GWL_STYLE)
    If (lngStyle And IsTask) = IsTask Then TaskWindow = True
    End Function


    Sub FindAllApps()
    Dim hwCurr As Long
    Dim intLen As Long
    Dim strTitle As String
    ' process all top-level windows in master window list
    List1.Clear
    hwCurr = GetWindow(Me.hWnd, GW_HWNDFIRST) ' get first window
    Do While hwCurr ' repeat for all windows
    If hwCurr <> Me.hWnd And TaskWindow(hwCurr) Then
    intLen = GetWindowTextLength(hwCurr) + 1 ' Get length
    strTitle = Space$(intLen) ' Get caption
    intLen = GetWindowText(hwCurr, strTitle, intLen)
    If intLen > 0 Then ' If we have anything, add it
    List1.AddItem strTitle
    ' and let's save the window handle in the itemdata array
    List1.ItemData(List1.NewIndex) = hwCurr
    End If
    End If
    hwCurr = GetWindow(hwCurr, GW_HWNDNEXT)
    Loop
    End Sub

    Private Sub Timer1_Timer()
    FindAllApps
    End Sub


      Forum Saati Paz Mayıs 19, 2024 6:44 pm