PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 (d:\works\traff\test.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 10/09/05 07:49:06 PM * DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 314 Width = 279 ScrollBars = 1 DoCreate = .T. ShowTips = .T. Caption = "Form1" Name = "Form1" ADD OBJECT list1 AS listbox WITH ; BoundColumn = 2, ; ColumnCount = 2, ; ColumnWidths = "150,60", ; ControlSource = "cTest1.Test", ; Height = 267, ; Left = 8, ; Top = 27, ; Width = 257, ; BoundTo = .T., ; Name = "List1" PROCEDURE Init thisform.List1.RowSourceType = 6 thisform.List1.RowSource = [cTest.Name1, Numtest] SELECT cTest GO 5 thisform.List1.Value = Numtest thisform.List1.Refresh() thisform.List1.SetFocus() ENDPROC PROCEDURE Load CREATE CURSOR cTest1 (test N(10)) APPEND BLANK CREATE CURSOR cTest (Numtest N(10), Name1 C(10)) FOR asd = 1 TO 10 INSERT INTO cTest VALUES (asd, "Name1"+TRANSFORM(asd)) NEXT GO TOP ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************