How to Create Hot Spots on Top of a Picture in a FormLast reviewed: August 2, 1995Article ID: Q133287 |
The information in this article applies to:
SUMMARYThis article shows by example how programmers can use Visual FoxPro's Invisible button style or Square shape to emulate a hot spot on top of a picture object.
MORE INFORMATION
Code Sample
PUBLIC ofrmMyform && Create a public variableofrmMyform=CREATEOBJECT("frmMyform")&& Create an instance the object ofrmMyform.SHOW && Call the show eventDEFINE CLASS frmMyform AS form
DoCreate = .T. Caption = "Invisible Button Style" Movable = .F. && Make the form Un-movable Name = "Form1" ADD OBJECT image1 AS image WITH ; && Add the picture to the form Picture = "samples\graphics\bmps\gauge\horz1.bmp", ; Height = 37, ; Left = 96, ; Top = 96, ; Width = 183, ; Name = "Image1" ADD OBJECT command1 AS commandbutton WITH ; Top = 101, ; Left = 240, ; Height = 24, ; Width = 37, ; Caption = "Command1", ; Enabled = .T., ; Style = 1, ; DisabledForeColor = RGB(0,0,0), ; Name = "Command1" ADD OBJECT shape1 AS shape WITH ; BackStyle = 0, ; BorderStyle = 0, ; Height = 32, ; Left = 144, ; Top = 97, ; Width = 37, ; Name = "Shape1" PROCEDURE command1.Click Wait Window "This Is The Invisible Button Click Method" ENDPROC PROCEDURE shape1.Click Wait Window "This is The Shape Click Method" ENDPROCENDDEFINE
What the Code DoesThe code creates an instance of a class called frmMyform, and frmMyform define three objects:
Steps to Recreate Code Sample by Using the Form Designer
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |