>you can also put code in a 'custom' class. in the controls that need this code, just create this custom object...
Visual dBase:
parameter bModal
local f
f = new test1FORM()
if (bModal)
f.mdi = .F. && ensure not MDI
f.ReadModal()
else
f.Open()
endif
CLASS test1Form OF Form
This.Top = 10.2998
This.Text = "Form"
This.Height = 8.8496
This.Width = 53.875
This.Left = 33.375
DEFINE IMAGE Img_Stop OF This;
PROPERTY;
Top 1,;
OnMouseMove CLASS::MOUSEMOVE_IMG,;
DataSource "BWCC.DLL",;
Height 7,;
Width 12,;
Left 2
DEFINE IMAGE Img_Go OF This;
PROPERTY;
Top 1,;
OnMouseMove CLASS::MOUSEMOVE_IMG,;
DataSource "BWCC.DLL",;
Height 7,;
Width 14,;
Left 38
DEFINE TEXT txtGuideLine OF This;
PROPERTY;
Top 1,;
FontBold .F.,;
Text "Text1",;
Alignment 4,;
Height 7,;
Width 22,;
Left 16
Procedure MouseMove_Img(flags, col, row)
DO CASE
CASE This.Name == "IMG_STOP"
Form.txtGuideLine.Text = "Terminate this form!"
This.OnMouseMove = IgnoreMouseMove
Form.Img_Go.OnMouseMove = CLASS::MOUSEMOVE_IMG
CASE This.Name == "IMG_GO"
Form.txtGuideLine.Text = "Execute something!"
This.OnMouseMove = IgnoreMouseMove
Form.Img_Stop.OnMouseMove = CLASS::MOUSEMOVE_IMG
ENDCASE
ENDCLASS
Procedure IgnoreMouseMove
Return
I hope that this example illustrates what I mean by SHARING methods
among controls. The question is: Is there a similar way in VFP?
If there isn't, then what are exact steps to create control arrays
in designer?
Some things are better be left unknown...NOT!!!