>PUBLIC oform1 >oform1=NEWOBJECT("form1") >oform1.Show >RETURN > >************************************************** >*-- BaseClass: form >DEFINE CLASS form1 AS form > > Top = 0 > Left = 0 > Height = 250 > Width = 279 > DoCreate = .T. > Caption = "Form1" > select_file = "" > Name = "Form1" > DIMENSION my_fields[1] > > ADD OBJECT combo1 AS combobox WITH ; > Height = 24, ; > Left = 43, ; > Style = 2, ; > Top = 62, ; > Width = 191, ; > BoundTo = .T., ; > Name = "Combo1" > > ADD OBJECT command1 AS commandbutton WITH ; > Top = 126, ; > Left = 41, ; > Height = 27, ; > Width = 84, ; > Caption = "GetFile", ; > Name = "Command1" > > ADD OBJECT text2 AS textbox WITH ; > Enabled = .F., ; > Height = 23, ; > Left = 42, ; > Top = 94, ; > Visible = .F., ; > Width = 191, ; > Name = "Text2" > > ADD OBJECT label1 AS label WITH ; > WordWrap = .T., ; > Alignment = 2, ; > Caption = "Label1", ; > Height = 39, ; > Left = 42, ; > Top = 11, ; > Visible = .F., ; > Width = 191, ; > Name = "Label1" > > PROCEDURE combo1.InteractiveChange > ThisForm.Text2.Value = EVALUATE(This.DisplayValue) > ENDPROC > > PROCEDURE command1.Click > ThisForm.select_file=GETFILE([dbf]) > IF NOT EMPTY(ThisForm.select_file) > USE (ThisForm.select_file) > AFIELDS(ThisForm.my_fields,JUSTSTEM(ThisForm.select_file)) > ThisForm.combo1.RowSourceType = 5 > ThisForm.combo1.RowSource = [ThisForm.my_fields] > ThisForm.combo1.Value = ThisForm.my_fields[1] > ThisForm.Combo1.Interactivechange() > ThisForm.Label1.Caption = ThisForm.select_file > ThisForm.Label1.visible = .t. > ThisForm.text2.Visible = .t. > ENDIF > ENDPROC >ENDDEFINE >*-- EndDefine: form1 >************************************************** >