You can do this using the UI Automation Library.
Using either UISPY.exe of Inspect.exe find the automationid , name etc any
parameter that can uniquely indentify the TextBox. One you have done this
you can do something like this, assuming you know the automation id.
string automationId = "ThirdyPartBox";
string newTextBoxValue = "foobar";
var condition = new PropertyCondition(AutomationElement.AutomationIdProperty, automationId);
var textBox = AutomationElement.RootElement.FindFirst(TreeScope.SubTree , condition);
ValuePattern vPattern = (ValuePattern)textBox.GetCurrentPattern(ValuePattern.Pattern);
vPattern.SetValue(newTextBoxValue);
Maybe the textbox is not uniquely identifiable by itself , you can use conditions like process id , parent container id etc to pin point it.
To Click a Button. Find the automation element first using a condition of your choice and then
InvokePattern clickButton = (InvokePattern)buttonElement.GetCurrentPattern(InvokePattern.Pattern);
clickButton.Invoke();