清除打印预览栏问题
我根据网上下载的结合我做的表单,发给大家,希望大家给帮我看看问题出在什么地方?表单1上有一个command1,
command1 click 事件
PUBLIC aForm,oform
IF !UPPER("FOXTOOLS") $ SET("LIBRARY")
SET LIBRARY TO Foxtools.Fll
ENDIF
DO DefinirForma
DO DOVistaPrevia
PROCEDURE DefinirForma
oForm = NEWOBJECT("Form002", "", "", "打印预览")
oForm.Show
DEFINE CLASS Form002 AS Form
AutoCenter = .T.
BorderStyle = 3
Caption = "APLIC_NAME" && 这个标题是可以改变的
Desktop = .T.
DoCreate = .T.
FontBold = .T.
FontName = "MS Sans Serif"
FontSize = 8
Height = 350
Name = "Form002"
ShowWindow = 2
SizeBox = .T.
TabStop = .F.
Tag = "501"
TitleBar = 0 && **** 重要!不要改动 ****
Width = 474
windowstate=2
icon="c:\documents and settings\administrator\桌面\自动获取照片\shell32.dll_22.ico"
PROCEDURE Init
LPARAMETERS lcCaption
LOCAL lnWHandle
THIS.Caption = lcCaption
*-- 这里设置的标题将不会显示
_WSetTitle(_WFindTitl(THIS.Caption), THIS.Caption)
ENDPROC
endif
ENDPROC
ENDDEFINE
ENDPROC
*-- Procedure DoVistaPrevia
PROCEDURE DoVistaPrevia
LOCAL lcAlias
lcAlias = ALIAS()
CREATE CURSOR TempDbf (TempMemo m)
SELECT TempDbf
APPEND BLANK
REPLACE TempDbf.TempMemo WITH "打印预览"
REPORT FORM dyzp NOCONSOLE PREVIEW IN WINDOW Form002&&&&预览显示在Form002中,并出现打印预览工具栏
MOVE WINDOW "打印预览" TO 100,100&&&在网上资料中说通过这两条就可以把清除表单Form002
打印预览工具栏,但实际情不行,还是出现打印预览工具栏,请高手给看看
RELEASE WINDOW "打印预览"
SELECT TempDbf
USE
IF !EMPTY(lcAlias) AND USED(lcAlias)
SELECT (lcAlias)
ENDIF
RELEASE WINDOWS Form002
ENDPROC