>>PUBLIC oTbr1 >> >>oTbr1 = NEWOBJECT("toolbar1") >>oTbr1.Show() >>oTbr1.dock(0) >> >>DEFINE CLASS toolbar1 AS toolbar >> >> Caption = "Toolbar1" >> Height = 28 >> Left = 500 >> Top = 0 >> Width = 63 >> Name = "mytoolbar" >> >> ADD OBJECT command1 AS commandbutton WITH ; >> Top = 3, ; >> Left = 5, ; >> Height = 22, ; >> width = 100, ; >> Caption = "LeftEdge", ; >> Name = "Command1" >> >> >> ADD OBJECT separator1 AS separator WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 0, ; >> Width = 0, ; >> Name = "Separator1" >> >> >> ADD OBJECT command2 AS commandbutton WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 22, ; >> width = 100, ; >> Caption = "LeftEdge", ; >> Name = "Command2" >> >> ADD OBJECT command3 AS commandbutton WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 22, ; >> width = 100, ; >> Caption = "LeftEdge", ; >> Name = "Command3" >> >> ADD OBJECT command4 AS commandbutton WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 22, ; >> width = 100, ; >> Caption = "RightEdge", ; >> Name = "Command4" >> >> ADD OBJECT command5 AS commandbutton WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 22, ; >> width = 100, ; >> Caption = "LeftEdge", ; >> Name = "Command5" >> >> ADD OBJECT command6 AS commandbutton WITH ; >> Top = 3, ; >> Left = 35, ; >> Height = 22, ; >> width = 100, ; >> Caption = "RightEdge", ; >> Name = "command6" >> >> PROCEDURE command1.Click >> =RunForm(0,this.parent.left+this.left) >> ENDPROC >> >> PROCEDURE command2.Click >> =RunForm(0,this.parent.left+this.left) >> ENDPROC >> PROCEDURE command3.Click >> =RunForm(0,this.parent.left+this.left) >> ENDPROC >> PROCEDURE command4.Click >> =RunForm(0,this.parent.left+this.left+this.width-4,.T.) >> ENDPROC >> PROCEDURE command5.Click >> =RunForm(0,this.parent.left+this.left) >> ENDPROC >> PROCEDURE command6.Click >> =RunForm(0,this.parent.left+this.left+this.width-4,.T.) >> ENDPROC >> >> >> PROCEDURE command1.RightClick >> DEFINE POPUP myshortcut shortcut RELATIVE FROM MROW()+1,MCOL() >> DEFINE BAR 1 OF myshortcut PROMPT "sm1" >> DEFINE BAR 2 OF myshortcut PROMPT "sm2" >> DEFINE BAR 3 OF myshortcut PROMPT "am3" >> ACTIVATE POPUP myshortcut >> ENDPROC >> >> PROCEDURE command2.RightClick >> DEFINE POPUP myshortcut shortcut RELATIVE FROM MROW(),MCOL() >> DEFINE BAR 1 OF myshortcut PROMPT "sm1-2" >> DEFINE BAR 2 OF myshortcut PROMPT "sm2-2" >> DEFINE BAR 3 OF myshortcut PROMPT "am3-2" >> ACTIVATE POPUP myshortcut >> ENDPROC >> >>ENDDEFINE >> >>PROCEDURE runform >>LPARAMETERS t1, t2, t3 >>oform = CREATEOBJECT('testform',t1,t2,t3) >>oform.show() >>return >> >>DEFINE CLASS testform AS form >> >> >> ShowWindow = 0 >> DoCreate = .T. >> AutoCenter = .F. >> Caption = "Form1" >> WindowType = 1 >> WindowState = 0 >> Name = "MENUFORM" >> >> >> ADD OBJECT command1 AS commandbutton WITH ; >> Top = 84, ; >> Left = 135, ; >> Height = 27, ; >> Width = 120, ; >> Caption = "Close form", ; >> Name = "Command1" >> >> >> PROCEDURE Init >> LPARAMETERS trow, tcol,tright >> DODEFAULT() >> IF !tright AND (TYPE('trow') <> "L" AND TYPE('tcol') <> "L") >> this.top = trow >> this.left = tcol >> ELSE >> IF tright AND (TYPE('trow') <> "L" AND TYPE('tcol') <> "L") >> this.top = trow >> this.left = tcol - this.width >> ENDIF >> ENDIF >> ENDPROC >> >> PROCEDURE command1.click >> thisform.release() >> ENDPROC >> >> >>ENDDEFINE >>