Dinky, solo son errores que si no lo cometes es mejor, por ejemplo (ya te lo habia dicho en otro post) usas mal FindWindow
handle = FindWindow (vbNullString, "Calculadora")' solo para un windows en castellano
handle = FindWindow("SciCalc", vbNullString) ' para windows con cualquier idioma
No te enojes, que tal si Clausuramos esa calculadora ???
handle = FindWindow (vbNullString, "Calculadora")' solo para un windows en castellano
handle = FindWindow("SciCalc", vbNullString) ' para windows con cualquier idioma
No te enojes, que tal si Clausuramos esa calculadora ???
Código [Seleccionar]
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Sub Command1_Click()
Call EnableWindow(FindWindow("SciCalc", vbNullString), 1)
End Sub
Private Sub Form_Load()
Shell "calc"
Dim handle As Long
handle = FindWindow("SciCalc", vbNullString)
Call SendMessage(handle, &HC, 0, ByVal "CLAUSURADO")
Call EnableWindow(handle, 0)
Dim handle2 As Long
handle2 = FindWindowEx(handle, 0, "Edit", vbNullString)
Call SendMessage(handle2, &HC, 0, ByVal "POR EH")
End Sub