Computer Programming

Computer Programming » A Generic Computer Program » Changing the Title of the Window

Changing the Title of the Window

Select the form. The little white squares will be around the item. The squares are not just a visual cue to tell you that you have selected an item, but they used to allow you to expand or contract the item. For now we are only using them to make sure we select the correct item. The reason that we are selecting that item is that we wish to make changes to that item.


As we have selected the Form1 item, the properties window will be changed to reflect the properties that can be changed for a form. The values associated with the Form1 form are displayed. Highlight the Text property. The property name Text is a commonly used property name even if it may not seem to be the best choice of a name.


Change the title from Form1 to My Window by changing the data associated with the text property of the form. You can select the entire word Form1 and then when you begin to type it will replace it, or you can place your cursor in the area of Form1, delete the characters and then type.


The title is changed to My Window, and when the program is run the name My Window will be displayed. We will see later how to change this title dynamically as the program runs.


Run the program. Our program does not do much yet, other than displaying the form window.


The new window will now have the title of My Window when the program runs.


⇐ Prev Chapter
Starting a new program

Next Chapter ⇒
Adding a textbox

Computer Programming for Everyday People
Michael Bigrigg

Amazon eBook

Powered by w3.css