How to Change the .BMP Picture On a Command Button at Run TimeID: Q146423 3.00 3.00b WINDOWS
The information in this article applies to:
SUMMARYThe Command Button control has a Picture property that can be assigned a bitmap (a graphic file with a .bmp extension), which allows the bitmap to be displayed on the face of the command button. This article shows by example how the Picture property can be changed at run time to change the bitmap displayed on the button.
MORE INFORMATION
Step-by-Step ExampleThe following example demonstrates how to change the Picture property of a command button at run time. 1. Create a new form. 2. In the Form Designer, right-click the form, and select Data Environment. 3. Add a command button (Command1) to the form. Remove Command1 from the
4. Place the following code in the command button's Init event code:
5. Place the following code in the command button's Click event:
6. Place a list box on the form. Set its Height property to 23, its
7. Save and run the form.
8. Press the command button to toggle the Height of the list box and Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbhowto
KBSubcategory: FxprgClassoop
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |