este codigo cambia el texto del boton inicio de windows por el que quieras ingresando en un textbox, solo xp.
ingresa una caja de texto y un boton:
en un modulo:
Código:Public Const WM_SETTEXT = &HC Public 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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function GetWindow Lib "user32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long Public Function StringToByteArray(str As String) As Variant Dim bray() As Byte Dim cnt As Integer Dim ln As Integer ln = Len(str) ReDim bray(ln) For cnt = 0 To ln - 1 bray(cnt) = Asc(Mid(str, cnt + 1, 1)) Next cnt bray(ln) = 0 StringToByteArray = bray End Function
en el formulario,con el textbox y un boton:
Código:Dim wnd As Long, tWnd As Long Private Sub Command1_Click() Dim dummy() As Byte ReDim dummy(Len(Text1) + 1) dummy = StringToByteArray(Text1.Text) Call SendMessage(wnd, WM_SETTEXT, 0&, dummy(0)) End Sub Private Sub Form_Load() 'Find the taskbar window , Shell_TrayWnd tWnd = FindWindow("Shell_TrayWnd", "") '5 stands for GW_CHILD or GW_MAX wnd = GetWindow(tWnd, 5) End Sub
saludos.