>>oForm = Createobject('MyForm') >>oForm.Show >>Read Events >> >>Define Class myform As Form >> DataSession = 2 >> Top = 0 >> Left = 0 >> Height = 289 >> Width = 312 >> DoCreate = .T. >> Caption = "Form1" >> Name = "Form1" >> >> Add Object text1 As TextBox With ; >> Height = 23, Left = 84, ; >> Top = 24, Width = 100, Name = "Text1" >> >> Add Object grid1 As Grid With ; >> ColumnCount = 1, Height = 204, ; >> Left = 84, Panel = 1, ; >> RecordSource = "sorttest", ; >> Top = 60, Width = 176, ; >> Name = "Grid1", ; >> Column1.ControlSource = "sorttest.skno", ; >> Column1.Width = 136, ; >> Column1.Name = "Column1" >> >> Add Object label1 As Label With ; >> Caption = "Search", ; >> Height = 17, Left = 12, Top = 24, ; >> Width = 40, Name = "Label1" >> >> Procedure Load >> Create Cursor SORTTEST (SKNO i) >> For ix=1 To 100000 >> Insert Into SORTTEST Values (ix) >> Endfor >> Locate >> Index On SKNO Tag SKNO >> Index On Padl(SKNO,10,'0') Tag SKNOA >> set order to 0 && Intensify we don't need it to be current order >>Endproc >> >> Procedure text1.InteractiveChange >> =Seek(Padl(Trim(This.Value),10,'0'),'sorttest','sknoa') >> With This.Parent.grid1 >> .Tag = Trans(Recno()) >> .Refresh() >> Endwith >>Endproc >> >> Procedure grid1.Init >> This.SetAll('DynamicBackColor',; >> 'iif(RECNO()=VAL(this.Tag),RGB(0,255,255),RGB(255,255,255))') >> This.Column1.header1.Caption = "SkNo" >>Endproc >> Procedure QueryUnload >> Clear Events >>Endproc >>Enddefine >>Cetin