关于程序保存的问题
我把用CommonDialog控件打开的pmac(*.pmc)程序文件修改后再保存时,程序中出现一部分乱码,请各位高手帮忙解决,谢谢!下面是程序:
Select Case Index
Case 0
CMDialog1.Filter = "PMC文件(*.pmc)|*.pmc" ' # 打开PMAC编辑程序 #
CMDialog1.ShowOpen
downfilename = CMDialog1.FileName
RichTextBox1.LoadFile downfilename
Case 1
CMDialog1.Filter = "PMC文件(*.pmc)|*.pmc" '# 保存richtextbox1的程序为PMAC程序 #
CMDialog1.ShowSave
downfilename = CMDialog1.FileName
RichTextBox1.SaveFile downfilename
打开前的pmac程序:
&1
CLOSE
#1->1000X
OPEN PROG 2
CLEAR
LINEAR
INC
TA500
TS250
TM2000
P1=HDPosition
WHILE (P1<10)
X10
X-10
DWELL500
ENDWHILE
CLOSE
保存后的程序:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\lang2052\fs18
\par
\par &1\tab
\par CLOSE\tab
\par #1->1000X\tab
\par
\par
\par
\par OPEN PROG 2\tab
\par CLEAR
\par LINEAR\tab
\par INC\tab
\par TA500\tab
\par TS250\tab
\par TM2000\tab
\par P1=HDPosition\tab
\par WHILE (P1<10)\tab
\par X10\tab
\par X-10\tab
\par DWELL500\tab
\par ENDWHILE\tab