Try this:
Code:
Option Explicit
Private Const GWL_HWNDPARENT As Long = (-8&)
Private Declare Function FindWindowW Lib "user32.dll" (Optional ByVal lpClassName As Long, Optional ByVal lpWindowName As Long) As Long
Private Declare Function SetWindowLongW Lib "user32.dll" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub Form_Click()
Dim nTries As Integer, hWndPaint As Long
CreateObject("Shell.Application").ShellExecute "pbrush"
Do: Sleep 250&
hWndPaint = FindWindowW(StrPtr("MSPaintApp"))
If hWndPaint Then Exit Do Else nTries = nTries + 1
Loop While nTries < 50
If hWndPaint = 0& Then Exit Sub
SetWindowLongW hWnd, GWL_HWNDPARENT, hWndPaint 'Make this Form owned by MSPaintApp
Visible = False
Visible = True 'Toggle visibility to update changes in owner window
End Sub