Local loGoPage loGoPage = CreateObject("frmGoPage") If Type("m.loGoPage") == "O" loGoPage.Show(1) Endif Define Class frmGoPage as Form Width = 150 Height = 100 Controlbox = .F. AutoCenter = .T. Caption = "Go to page" oPageframe = NULL Dimension aPages[1] Add Object lstPages as lstGoPage Procedure Init Local loRef loRef = Sys(1270) Do While Type("loRef.Parent") == "O" If loRef.BaseClass == "Pageframe" This.oPageframe = m.loRef Exit Endif loRef = loRef.Parent Enddo If IsNull(This.oPageframe) Return .F. Endif AMembers(This.aPages,This.oPageframe,2) This.lstPages.RowSource = "Thisform.aPages" This.lstPages.RowSourceType = 5 This.lstPages.Requery This.lstPages.ListIndex = 1 EndProc Enddefine Define Class lstGoPage as Listbox Width = 150 Height = 100 Procedure DblClick This.Go EndProc Procedure KeyPress(tnKeyCode,tnFlags) If m.tnKeyCode==13 This.Go Endif If m.tnKeyCode = 27 Thisform.Release Endif EndProc Procedure Go Local lcPage, llTabs lcPage = This.Value llTabs = Thisform.oPageframe.Tabs Thisform.oPageframe.Tabs = .T. Thisform.oPageframe.&lcPage..SetFocus If not m.llTabs Thisform.oPageframe.Tabs = .F. Endif Thisform.Release Endproc EnddefineChristof