Changing the header text of a grid control in Visual FoxPro 9

By default, grid control gets its header text from the fieldname caption of a record value displayed in a grid column. To change the grid control header text, follow these steps:

1. Click Start > All Programs > Visual FoxPro 9.

2. Click File>New>Table>New File> Type the table name. For the sake of example, use tblNames as a filename>Click Save. Alternatively, you can type CREA tblNames in the command window. Enter the following fieldname captions and data type:



3. Then Click the Ok Button.

4. Press CTRL + F2 to view the command window. Type APPE then press enter. The APPE or APPEND commands pops-up the append window which enables you to add new records.

5. Add the following records:



6. Click the close button [x] to save the inputted records.

7. Create a new form by clicking File>New>Form>New File. Alternatively, type CREA form in the command window then press enter.

8. Click View> Form Control Toolbar(twice) to activate the toolbox window then click and drag a Grid control from the toolbox to your form.

9. Right-click the Grid control on your form>Select builder. A dialog box containing the following options should then appear:



10. Click the [>>] button. This transfers the fieldnames in the Available fields list box to the selected fields list box.

11. Click the layout tab. The following should then appear:



12. Click the grid control’s column header then enter your desired caption in the caption textbox.




13. Click the Ok button to apply the changes then press CTRL + E to run your form. Alternatively, you can click the run [!] icon.

Changing the title bar caption of your dialog-based application (Microsoft Visual C++ 6.0 MFC AppWizard(exe))

1. Right-click the title bar of your dialog-box then select  Properties from the pop-up menu. The Dialog properties dialog-box will then become visible. Click the general tab then locate the caption textbox.

2. Key in your desired caption in the caption textbox then click the close[x] button of the Dialog properties dialog-box. The inputted caption should now appear on the title bar of your dialog box. Additionally, you can modify the font face and size of your MFC dialog box by right-clicking the caption of your dialog and  selecting properties>general tab and clicking the Font button then choosing your desired font face and font size. Unfortunately , it will also resize the dialog box, just click and drag the selection handle of your dialog to restore it to its default size.