Declare Sub SetWindowPos Lib \"user32\" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer)
Declare Function FindWindow Lib \"user32\" Alias \"FindWindowA\" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const HWND_TOP = 0
Public Const HWND_BOTTOM = 1
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Sub Command1_Click( )
dim handle as long
shell ..... y ejecutás la calculadora
handle= FindWindow(0,\"Calculadora\")
OnTop True, handle)
end sub
Private sub OnTop(ByVal New_OnTop As Boolean, m_HWnd as Long)
If New_OnTop Then
SetWindowPos m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, 3
Else
SetWindowPos m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, 3
End If
End Sub
No tengo como probarlo, pero en teoría tendría que funcionar sin ningún problema.
Cualquier cosa mandame un email.
[email protected] Suerte.