报告老师,我低头不是因为我在装低调,是你问的问题,我真的不会答,,,
[此贴子已经被作者于2015-12-22 10:34编辑过]
[此贴子已经被作者于2015-12-22 12:47编辑过]
CLEAR ALL CLOSE PROCEDURES SET PROCEDURE TO "MyForm", "MyLogin","otherForm" runShouliaoForm() CLOSE PROCEDURES &&CLOSE ALL return PROCEDURE runShouliaoForm PUBLIC ShouliaoForm ShouliaoForm=CREATEOBJECT("m1Form") ShouliaoForm.show READ EVENTS RETURN ENDPROC DEFINE CLASS m1Form as myForm showWindow=2 caption="功能1——收料单" autoCenter=.t. windowType=1 beforeWidth=this.width currWidth=this.width beforeHeight=this.Height currHeight=this.Height minWidth=this.Width minHeight=this.Height ADD OBJECT infoLabel1 as label WITH backColor=RGB(222,222,222),wordWrap=.f.,caption="123",autoSize=.t. ADD OBJECT infoLabel2 as label WITH backColor=RGB(222,222,222),wordWrap=.f.,caption="456" ADD OBJECT infoLabel3 as label WITH backColor=RGB(222,222,222),wordWrap=.f.,caption="789" PROCEDURE Arrange WITH this.infoLabel1 .top=this.height/10 .left=this.width/10 &&.width=this.width/10*8 .height=this.height/10-1 ENDWITH WITH this.infoLabel2 .top=this.height/10*2 .left=this.width/10 .width=this.width/10*8 .height=this.height/10-1 ENDWITH WITH this.infoLabel3 .top=this.height/10*3 .left=this.width/10 .width=this.width/10*8 .height=this.height-this.height/10*4 ENDWITH LOCAL tempFormWidth,tempFormHeight tempFormWidth=this.width tempFormHeight=this.height IF (this.beforeWidth<>tempFormWidth) .or. (this.beforeHeight<>tempFormHeight) this.currWidth=tempFormWidth this.currHeight=tempFormHeight LOCAL labelMess1,labelMess2,labelMess3 labelMess1="窗体加载时高为:"+ALLTRIM(STR(thisform.minheight))+",宽为:"++ALLTRIM(STR(thisform.minWidth)) thisform.infoLabel1.caption=labelMess1 labelMess2="窗体调整前高为:"+ALLTRIM(STR(thisform.beforeHeight))+",宽为:"++ALLTRIM(STR(thisform.beforeWidth)) thisform.infoLabel2.caption=labelMess2 FOR tempFontSize=8 TO 72 STEP 0.5 this.InfoLabel1.fontSize=tempFontSize IF (this.infoLabel1.height>this.infoLabel2.height).or.(this.infoLabel1.width>this.infoLabel2.width) this.infoLabel1.fontSize=tempFontSize-0.5 RETURN ENDIF ENDFOR labelMess3="窗体调整后高为:"+ALLTRIM(STR(thisform.currHeight))+",宽为:"++ALLTRIM(STR(thisform.currWidth)) labelMess3=labelMess3+CHR(13) labelMess3=labelMess3+"窗体高的缩放比例为:"+ALLTRIM(STR(thisform.currHeight/thisform.beforeHeight,10,4)) labelMess3=labelMess3+CHR(13) labelMess3=labelMess3+"窗体宽的缩放比例为:"+ALLTRIM(STR(thisform.currWidth/thisform.beforeWidth,10,4)) thisform.infoLabel3.caption=labelMess3 ENDIF this.beforeWidth=this.width this.beforeHeight=this.height ENDPROC PROCEDURE Activate This.Arrange ENDPROC PROCEDURE Resize This.Arrange ENDPROC PROCEDURE Destroy CLEAR EVENTS ENDPROC ENDDEFINE