Para hacer eso tenes que saber el handle del botón que quieres presionar. Y enviarle con SendMessage "un click"
Acá tienes el código del SendMessage:
<System.Runtime.InteropServices.DllImport("user32.DLL")> _
Public Function SendMessage( _
ByVal hWnd As System.IntPtr, ByVal wMsg As Integer, _
ByVal wParam As Integer, ByVal lParam As Integer _
) As Integer
End Function
<System.Runtime.InteropServices.DllImport("user32.DLL")> _
Public Function SendMessage( _
ByVal hWnd As System.IntPtr, ByVal wMsg As Integer, _
ByVal wParam As Integer, ByVal lParam As String _
) As Integer
End Function
Para buscar el handle del boton puedes instalarte WinID (asi sabes como buscarlo desde la aplicacion)
Seguramente te sirvan todas estas funciones:
<System.Runtime.InteropServices.DllImport("user32.dll", _
EntryPoint:="FindWindow")> _
Public Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Public Function EnumChildWindows(ByVal hWndParent As System.IntPtr, ByVal lpEnumFunc As EnumWindowsProc, ByVal lParam As Integer) As Boolean
End Function
Public Function GetChildWindows(ByVal ParentHandle As IntPtr) As IntPtr()
Dim ChildrenList As New List(Of IntPtr)
Dim ListHandle As GCHandle = GCHandle.Alloc(ChildrenList)
Try
EnumChildWindows(ParentHandle, AddressOf EnumWindow, GCHandle.ToIntPtr(ListHandle))
Finally
If ListHandle.IsAllocated Then ListHandle.Free()
End Try
Return ChildrenList.ToArray
End Function
Private Function EnumWindow(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean
Dim ChildrenList As List(Of IntPtr) = GCHandle.FromIntPtr(Parameter).Target
If ChildrenList Is Nothing Then Throw New Exception("GCHandle Target could not be cast as List(Of IntPtr)")
ChildrenList.Add(Handle)
Return True
End Function
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Public Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer)
' Leave function empty
End Sub
Lo que no se es cual es la constante a enviar. Quedaría buscar por ahí
Saludos