"Read" is defined?
could you post the errors?
could you post the errors?
SetWindowText(p.MainWindowHandle , "example" )
Well , it should already work because you search for sro_clients and select the first one. I want to change the name of the client which has started from my tool.But , i will try yours setwindowtext func. :)Quote:
i have tested and it works great, tryt this code :
<DllImport("user32.dll")> _
Public Function SetWindowText(ByVal hdl As IntPtr, ByVal title As String) As Boolean
End Function
Sub Main()
Dim prc As Process = Process.GetProcessesByName("sro_client")(0)
If SetWindowText(prc.MainWindowHandle, "b3nc0") Then
Debug.Print("ok")
End If
End Sub
yes I use search but you can use your p.MainWindowHandle.Quote:
Well , it should already work because you search for sro_clients and select the first one. I want to change the name of the client which has started from my tool.But , i will try yours setwindowtext func. :)
The strange thing is , it sometimes work sometimes doesnt. I check p.Mainwindowhandle , even though it's not 0 , sometimes it doesnt work.Quote:
yes I use search but you can use your p.MainWindowHandle.