Setting the Text Property of the Form

Notice that the text that appears in the form's title bar says Form1. This is because Visual Studio .NET sets the form's title bar text to the name of the form when it is first created, but doesn't change it when you change the name of the form. The text in the title bar is determined by the value of the Text property of the form. Click the form once more so that its properties appear in the Properties window. Use the scrollbar in the Properties window to locate the Text property (you'll find it in the Appearance category), and then change the text to Picture Viewer. Press Enter or click on a different property. You'll see the text in the title bar of the form change.

Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.