[blue]Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
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 Const BM_SETSTATE = &HF3
Private Sub Command1_Click()
Command2.SetFocus ' If we want the control outlined and to have the focus rectangle for the full 'pressed' effect
SendMessage Command2.hwnd, BM_SETSTATE, True, 0& ' Down - which is how a COmmand Button is highlighted
Sleep 500 ' Brief pause so we can see button is down
SendMessage Command2.hwnd, BM_SETSTATE, 0&, 0& ' Up - remove highlighting
Command1.SetFocus
End Sub
[/blue]