We iterate through each of the fields. For each field we focus
on the field. We then color the rectangle light gray and draw the
name of the field in dark red.
var names = doc.Form.GetFieldNames();
foreach (string name in names) {
Field theField = doc.Form[name];
theField.Focus();
doc.Color.String = "240 240 255";
doc.FillRect();
doc.Rect.Height = 16;
doc.Color.String = "220 0 0";
doc.AddText(theField.Name);
doc.Delete(theField.ID);
}
Dim theNames As String() = doc.Form.GetFieldNames()
For Each theName As String In theNames
Dim theField As Field = doc.Form(theName)
theField.Focus()
doc.Color.String = "240 240 255"
doc.FillRect()
doc.Rect.Height = 16
doc.Color.String = "220 0 0"
doc.AddText(theField.Name)
doc.Delete(theField.ID)
Next