Réponse acceptée !
Salut, ecoute j'y suis quand meme arrivé avec:
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Long Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As IntPtr, ByVal hWnd2 As IntPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As IntPtr
Private Const BM_CLICK = &HF5
Dim process As Process = New Process() Dim Searches As Process() = process.GetProcessesByName("Search.vshost") Dim Search As Process If Searches.Length <> 0 Then Search = Searches(0) SetForegroundWindow(Search.MainWindowHandle) Dim SearchHandle As IntPtr = FindWindowEx(Search.MainWindowHandle, IntPtr.Zero, "Find now", Nothing) SendMessage(SearchHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero)
et WM_SETTEXT pour le txtbox c pas vraiment ce que je voulais faire mais cela fonctionne Merci de ton aide @+ youpi :)
|