Eleкtro
Ex-Staff
Desconectado
Mensajes: 9.885
|
Bueno, en Batch puedes hacerlo modificando los valores del cursor actual en el registro, pero para que los cambios tengan efecto deberás reiniciar PC/Sesión. Primero modificas el valor aquí: HKEY_CURRENT_USER\Control Panel\Cursors Scheme Source Lo dejas a "1" para indicar que deseas usar un esquema de cursor customizado. Y luego añades los valores correspondientes a cada cursor, y la dirección del archivo... Ejemplo: Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Cursors] @="Glass Maxx" "Scheme Source"=dword:00000001 "Arrow"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,41,00,72,00,72,00,6f,\ 00,77,00,2e,00,61,00,6e,00,69,00,00,00 "Help"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,48,00,65,00,6c,00,70,\ 00,2e,00,61,00,6e,00,69,00,00,00 "AppStarting"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,\ 00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,\ 6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,41,00,70,00,70,\ 00,53,00,74,00,61,00,72,00,74,00,69,00,6e,00,67,00,2e,00,61,00,6e,00,69,00,\ 00,00 "Wait"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,57,00,61,00,69,00,74,\ 00,2e,00,61,00,6e,00,69,00,00,00 "Crosshair"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,\ 54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,\ 00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,63,00,72,00,6f,00,\ 73,00,73,00,2e,00,61,00,6e,00,69,00,00,00 "IBeam"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,49,00,42,00,65,00,61,\ 00,6d,00,2e,00,61,00,6e,00,69,00,00,00 "NWPen"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,48,00,61,00,6e,00,64,\ 00,77,00,72,00,69,00,74,00,69,00,6e,00,67,00,2e,00,61,00,6e,00,69,00,00,00 "No"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,\ 25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,\ 00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,4e,00,4f,00,2e,00,61,00,\ 6e,00,69,00,00,00 "SizeNS"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,65,\ 00,4e,00,53,00,2e,00,61,00,6e,00,69,00,00,00 "SizeWE"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,65,\ 00,57,00,45,00,2e,00,61,00,6e,00,69,00,00,00 "SizeNWSE"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,\ 54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,\ 00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,\ 65,00,4e,00,57,00,53,00,45,00,2e,00,61,00,6e,00,69,00,00,00 "SizeNESW"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,\ 54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,\ 00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,\ 65,00,4e,00,45,00,53,00,57,00,2e,00,61,00,6e,00,69,00,00,00 "SizeAll"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,\ 54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,\ 00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,\ 65,00,41,00,6c,00,6c,00,2e,00,61,00,6e,00,69,00,00,00 "UpArrow"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,\ 54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,\ 00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,55,00,70,00,41,00,\ 72,00,72,00,6f,00,77,00,2e,00,61,00,6e,00,69,00,00,00 "Hand"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,48,00,61,00,6e,00,64,\ 00,2e,00,61,00,6e,00,69,00,00,00
[HKEY_CURRENT_USER\Control Panel\Cursors\Schemes] "Glass Maxx"=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,\ 00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,\ 6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,41,00,72,00,72,\ 00,6f,00,77,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,54,00,\ 45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,\ 00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,\ 78,00,5c,00,48,00,65,00,6c,00,70,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,\ 00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,\ 75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,\ 00,4d,00,61,00,78,00,78,00,5c,00,41,00,70,00,70,00,53,00,74,00,61,00,72,00,\ 74,00,69,00,6e,00,67,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,\ 00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,\ 73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,\ 00,78,00,78,00,5c,00,57,00,61,00,69,00,74,00,2e,00,61,00,6e,00,69,00,2c,00,\ 25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,\ 00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,\ 73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,63,00,72,00,6f,00,73,00,73,00,2e,\ 00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,\ 4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,\ 00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,49,00,\ 42,00,65,00,61,00,6d,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,\ 00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,\ 73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,\ 00,78,00,78,00,5c,00,48,00,61,00,6e,00,64,00,77,00,72,00,69,00,74,00,69,00,\ 6e,00,67,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,54,00,45,\ 00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,\ 72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,\ 00,5c,00,4e,00,4f,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,\ 54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,\ 00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,\ 78,00,78,00,5c,00,53,00,69,00,7a,00,65,00,4e,00,53,00,2e,00,61,00,6e,00,69,\ 00,2c,00,25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,\ 25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,\ 00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,65,00,\ 57,00,45,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,54,00,45,\ 00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,\ 72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,\ 00,5c,00,53,00,69,00,7a,00,65,00,4e,00,57,00,53,00,45,00,2e,00,61,00,6e,00,\ 69,00,2c,00,25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,\ 00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,\ 61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,65,\ 00,4e,00,45,00,53,00,57,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,00,\ 53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,72,\ 00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,00,\ 61,00,78,00,78,00,5c,00,53,00,69,00,7a,00,65,00,41,00,6c,00,6c,00,2e,00,61,\ 00,6e,00,69,00,2c,00,25,00,53,00,59,00,53,00,54,00,45,00,4d,00,52,00,4f,00,\ 4f,00,54,00,25,00,5c,00,43,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,47,\ 00,6c,00,61,00,73,00,73,00,20,00,4d,00,61,00,78,00,78,00,5c,00,55,00,70,00,\ 41,00,72,00,72,00,6f,00,77,00,2e,00,61,00,6e,00,69,00,2c,00,25,00,53,00,59,\ 00,53,00,54,00,45,00,4d,00,52,00,4f,00,4f,00,54,00,25,00,5c,00,43,00,75,00,\ 72,00,73,00,6f,00,72,00,73,00,5c,00,47,00,6c,00,61,00,73,00,73,00,20,00,4d,\ 00,61,00,78,00,78,00,5c,00,48,00,61,00,6e,00,64,00,2e,00,61,00,6e,00,69,00,\ 00,00 (Esto es el código de arriba convertido) :: Archivo de registro convertido con REG2BAT by Elektro H@cker :: :: REG2BAT - Convierte archivos REG a BAT :: http://foro.elhacker.net/empty-t357848.0.html REG ADD "HKCU\Control Panel\Cursors" /V "" /D "Glass Maxx" /F REG ADD "HKCU\Control Panel\Cursors" /V "Scheme Source" /T "REG_DWORD" /D 0x00000001 /F REG ADD "HKCU\Control Panel\Cursors" /V "Arrow" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Arrow.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "Help" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Help.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "AppStarting" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\AppStarting.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "Wait" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Wait.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "Crosshair" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\cross.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "IBeam" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\IBeam.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "NWPen" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Handwriting.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "No" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\NO.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "SizeNS" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNS.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "SizeWE" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeWE.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "SizeNWSE" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNWSE.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "SizeNESW" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNESW.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "SizeAll" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeAll.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "UpArrow" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\UpArrow.ani" /F REG ADD "HKCU\Control Panel\Cursors" /V "Hand" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Hand.ani" /F REG ADD "HKCU\Control Panel\Cursors\Schemes" /V "Glass Maxx" /T "REG_EXPAND_SZ" /D "%%SYSTEMROOT%%\Cursors\Glass Maxx\Arrow.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\Help.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\AppStarting.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\Wait.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\cross.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\IBeam.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\Handwriting.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\NO.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNS.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeWE.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNWSE.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeNESW.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\SizeAll.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\UpArrow.ani,%%SYSTEMROOT%%\Cursors\Glass Maxx\Hand.ani" /F
¿Pero tu no te habias iniciado en VB.NET? si aún lo sigues usando puedes desarrollar en pocas líneas un programa commandline que modifique la imagen del cursor y ejecutarlo desde Batch xD. Aquí tienes el ejemplo, más tarde haré un snippet de esto y lo colgaré en el post de snippets: 'Dan Dombrowski 'July 2008 Public Class Form1 'API declarations Private Declare Function SetSystemCursor Lib "user32.dll" (ByVal hCursor As IntPtr, ByVal id As Integer) As Boolean Private Declare Function LoadCursorFromFile Lib "user32.dll" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As IntPtr 'Cursor constants Private Const IDC_APPSTARTING As UInt32 = 32650 Private Const IDC_ARROW As UInt32 = 32512 Private Const IDC_HAND As UInt32 = 32649 Private Const IDC_CROSS As UInt32 = 32515 Private Const IDC_HELP As UInt32 = 32651 Private Const IDC_IBEAM As UInt32 = 32513 Private Const IDC_NO As UInt32 = 32648 Private Const IDC_SIZEALL As UInt32 = 32646 Private Const IDC_SIZENESW As UInt32 = 32643 Private Const IDC_SIZENS As UInt32 = 32645 Private Const IDC_SIZENWSE As UInt32 = 32642 Private Const IDC_SIZEWE As UInt32 = 32644 Private Const IDC_UP As UInt32 = 32516 Private Const IDC_WAIT As UInt32 = 32514 'Variable to save current cursor Dim SavedCursor As Icon Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Save cursor SavedCursor = Icon.FromHandle(Cursors.Arrow.CopyHandle) 'Change arrow cursor to mine Dim NewCursor As IntPtr = LoadCursorFromFile(Application.StartupPath & "\MyCross.ani") 'Check If NewCursor = IntPtr.Zero Then 'Error loading cursor from file Debug. WriteLine("Error loading cursor from file.") Return End If 'Set the system cursor If SetSystemCursor(NewCursor, IDC_ARROW) = 0 Then 'Error setting system cursor Debug. WriteLine("Error setting system cursor.") Return End If 'Disable/enable buttons Button1.Enabled = False Button2.Enabled = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'Get old cursor Dim OldCursor As IntPtr = SavedCursor.Handle 'Set the system cursor SetSystemCursor(OldCursor, IDC_ARROW) 'Disable/enable buttons Button1.Enabled = True Button2.Enabled = False End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub
PD: Cada constante equivale a cada imagen del cursor (arrow, hand, busy, etc...) en el ejemplo sólo cambian el cursor principal (arrow).
|