' Sample of code, set backcolor to TextBox3, using reference : ' Command buttom code ' Set BackColor to TextBox3 trought reference Dim tb As TextBox = DirectCast(GetReference("textbox3"), TextBox) ' Acces to propierty tb.BackColor = Color.Azure
Private Function GetReference(ByVal nombreControl As String) As Control For Each ctrl As Control In Me.Controls If ctrl.Name.ToLower = nombreControl.ToLower Then ' Devolvemos la referencia y abandonamos la función Return ctrl End If Next Return Nothing End FunctionFrom VFP I can make this task with only one line of code using & and ..& , with VB.NET i must be write 600% more of code line to make the same task. While I understand the philosophy of desing and programming for C# AND VB.NET, every day I surprised the power of VFP to write solutions
* FoxPro Sample how to change the backcolor for a textbox1 MiVar1='TextBox1' THISFORM.&MiVar1..Backcolor=RGB(0,0,0)regards!