... sniper coding ...
- Bots - Opensource - Sourcecodes -

Name:  banner.png
Hits: 153
Größe:  32,8 KB

Hallo.

Hier ist ein SourceCode, wie ihr ganz einfach den Titeltext von Knuddels (z.B. Channel: K-Script, Nick: Sniper) verändern könnt.

EndScreen:


Code:
PHP-Code:
Imports System
Imports System
.Text
Imports System
.Windows.Forms
Imports System
.Runtime.InteropServices

Public Class Form1
 
    
<DllImport("user32.dll"CharSet:=CharSet.AnsiEntryPoint:="SendMessageA")> _
    
Public Shared Function SendMessages(ByVal hWnd As IntegerByVal Msg As UIntegerByVal wParam As IntegerByVal lParam As String) As IntPtr
    End 
Function
    <
DllImport("user32.dll"SetLastError:=True)> _
    
Private Shared Function FindWindow(ByVal lpClassName As StringByVal lpWindowName As String) As IntPtr
    End 
Function
    <
DllImport("user32.dll"SetLastError:=True)> _
    
Private Shared Function FindWindowEx(ByVal hwndParent As IntPtrByVal hwndChildAfter As IntPtrByVal lpszClass As StringByVal lpszWindow As String) As IntPtr
    End 
Function
    <
DllImport("user32.dll"SetLastError:=True)> _
    
Public Shared Function FindWindowEx(ByVal parentHandle As IntPtrByVal childAfter As IntPtrByVal className As StringByVal windowTitle As IntPtr) As IntPtr
    End 
Function
    <
DllImport("user32.dll"CharSet:=CharSet.AnsiEntryPoint:="SendMessageA")> _
    
Public Shared Function SendMessage(ByVal hWnd As IntegerByVal wMsg As UIntegerByVal wParam As UIntegerByVal lParam As Integer) As IntPtr
    End 
Function

    Public Declare Function 
EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As  _
     EnumWindowsProc
ByVal lParam As Int32) As Int32
    
Public Declare Function IsWindowVisible Lib "user32.dll" (ByVal hwnd As  _
    IntPtr
) As Boolean
    
Public Delegate Function EnumWindowsProc(ByVal hwnd As IntPtrByVal lParam _
    
As Int32) As Boolean
    
Public Declare Function GetWindowText Lib "user32.dll" Alias _
    
"GetWindowTextA" (ByVal hwnd As IntPtrByVal lpString As StringByVal cch _
    
As Int32) As Int32
    
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias _
    
"GetWindowTextLengthA" (ByVal hwnd As IntPtr) As Int32
    
Public Declare Function GetWindowLong Lib "user32.dll" Alias _
    
"GetWindowLongA" (ByVal hwnd As IntPtrByVal nIndex As Int32) As Int32
    
Public Declare Function GetParent Lib "user32.dll" (ByVal intptr As IntPtr_
    
As IntPtr
    
Public Const GWL_HWNDPARENT As Int32 = -8
    
Private newwindowlist As List(Of String)

    Private 
Sub RefreshWindowList()
        
newwindowlist = New List(Of String)
        
EnumWindows(AddressOf EnumWinProcCInt(True))
    
End Sub

  
    
Private Function EnumWinProc(ByVal hwnd As IntPtrByVal lParam As Int32_
    
As Boolean
        
If IsWindowVisible(hwndThen
            
If GetParent(hwnd) = IntPtr.Zero Then
                
If GetWindowLong(hwndGWL_HWNDPARENT) = 0 Then
                    Dim str 
As String _
                      String
.Empty.PadLeft(GetWindowTextLength(hwnd) + 1)
                    
GetWindowText(hwndstrstr.Length)
                    If 
Not String.IsNullOrEmpty(str.Substring(0str.Length _
                      1
)) Then newwindowlist.Add(str.Substring(0str.Length _
                      1
))
                
End If
            
End If
        
End If
        
EnumWinProc True
    End 
Function

    Public Const 
WM_SETTEXT As UInteger 12
    
Public Const cap As Integer 1048576
    
Private hWnd As IntPtr

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        
For Each item As String In CheckedListBox1.CheckedItems
            Dim titelfensterüberschrift 
As String "TEXT - http://sniper.x9.eu/"

            
hWnd FindWindow("SunAwtFrame"item)
            
SendMessages(hWnd.ToInt32(), WM_SETTEXTcaptitelfensterüberschrift)
        
Next
    End Sub

    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        RefreshWindowList
()
        
CheckedListBox1.Items.Clear()
        For 
Each item As String In newwindowlist
            
If item.StartsWith("Channel"Then
                CheckedListBox1
.Items.Add(item)
            
End If
        
Next
    End Sub
End 
Class 
Vielleicht könnt Ihr etwas damit anfangen.

Grüße.