Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 4

Add and Remove Methods pf StatusBar Control in Visual Basic 6

The Add method of the Panels Collection can be used to add panels to the StatusBar at runtime. The syntax is similar to the other Add methods discussed in this chapter:

StatusBar1.Panels.Add(index, key, text, style, picture)

Index and Key are the unique identifiers that enable you to access a particular Panel object. The Text argument is the text that appears in a panel. How a Panel object appears and what data it contains is determined by the Style argument. Finally if you want to add an image in the new panel, you can use the LoadPicture function in the Picture argument to include that image along with any other text that appears.

Panels can be removed at runtime by using the Remove method of the StatusBar. To remove a Panel object, you would use the following:

StatusBar1.Remove index

where the Index argument is either an integer equal to the Index property of the panel that you are removing or a string value equal to the Key of the panel.

Using the StatusBar Control topics

See Also


  

<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved