Visual Basic (Declaration) | |
---|---|
Public Property Value As System.Object |
C# | |
---|---|
public System.object Value {get; set;} |
Property Value
An object that represents the current value of the control.C# | Copy Code |
---|---|
private void detail_Format(object sender, System.EventArgs eArgs) { if (this.TextBox1.Value.ToString() == "10249") { this.txtShippedDate.OutputFormat = "MMMM"; this.txtShippedDate.ForeColor = System.Drawing.Color.Crimson; } else { this.txtShippedDate.OutputFormat = "MMM"; this.txtShippedDate.ForeColor = System.Drawing.Color.Black; } //use the following lines to be sure that the OutputFormat //is applied to every record this.TextBox1.Value = this.TextBox1.Value; this.txtShippedDate.Value = this.txtShippedDate.Value; } |
Visual Basic | Copy Code |
---|---|
Private Sub detail_Format(sender As Object, eArgs As System.EventArgs) If Me.TextBox1.Value.ToString() = "10249" Then Me.txtShippedDate.OutputFormat = "MMMM" Me.txtShippedDate.ForeColor = System.Drawing.Color.Crimson Else Me.txtShippedDate.OutputFormat = "MMM" Me.txtShippedDate.ForeColor = System.Drawing.Color.Black End If 'use the following lines to be sure that the OutputFormat 'is applied to every record Me.TextBox1.Value = Me.TextBox1.Value Me.txtShippedDate.Value = Me.txtShippedDate.Value End Sub |