
Botão SALVAR:
s is string = RTFToText(EDT_Anotacoes)
IF s <> "" THEN
RtfSalvar()
ELSE
Info("Não foi digitado nada para ser salvo.")
END
Ao abrir a Janela
Procedure RtfAbrir()
PathFile_RTF is string = fCurrentDir(fCurrentDrive()) +"\Anotacoes_"+Usuario+".RTF"
EDT_Anotacoes..RichEdit = True
EDT_Anotacoes..Visible = True
IF RTFLoad(EDT_Anotacoes, PathFile_RTF) = False THEN
RETURN
END
gfsDocumentName = PathFile_RTF
EDT_Anotacoes..Cursor = 1
IF TextHeight(EDT_Anotacoes, EDT_Anotacoes) > EDT_Anotacoes..Height THEN
ScrollBarShow(EDT_Anotacoes, sbVert)
ELSE
ScrollBarShow(EDT_Anotacoes, sbVert, False)
END
Procedure Salvar
Procedure RtfSalvar()
PathFile_RTF is string = fCurrentDir(fCurrentDrive()) +"\Anotacoes_"+Usuario+".RTF"
EDT_Anotacoes..RichEdit = True
EDT_Anotacoes..Visible = True
nFileID is int = 0
nFileID = fOpen(PathFile_RTF, foCreate + foWrite)
fWrite(nFileID, EDT_Anotacoes, Length(EDT_Anotacoes))
PathFile_RTF = ExtractString(PathFile_RTF, 1, “-”)
fClose(nFileID)
--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________