 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Darren
註冊時間: 2007-10-18 文章: 57
第 1 樓
|
發表於: 星期四 十月 18, 2007 10:29 am 文章主題: ??? 的問題 |
|
|
我用VFP9 SP1
如何用???指令列印中文 ? 我的程式如下 :-
----------------------------------開始
SET REPORTBEHAVIOR to 90
PRINTJOB
SET CONSOLE OFF
SET PRINTER TO lpt1
SET PRINTER ON
_PLENGTH = 66
_PADVANCE = 'LINEFEEDS'
_PEJECT = "NONE"
??? CHR(27)+"M"
? "不能顯示中文字"
?
?
SET PRINTER off
SET PRINTER TO
ENDPRINTJOB
----------------------------------結束
另一個問題是, 當碰到???指令時, 為何會跳了一頁才列印 |
|
回頂端 |
|
 |
wuno2001
註冊時間: 2007-02-09 文章: 56
第 2 樓
|
發表於: 星期一 十月 29, 2007 9:27 am 文章主題: |
|
|
去MSDN找了一下
??? Command
Sends output directly to the printer.
Syntax
??? cExpression
Arguments
cExpression
Specifies the characters that are sent to the printer.
Remarks
A group of three question marks bypasses the printer driver and sends the contents of cExpression directly to the printer. cExpression must contain valid printer codes.
Printer control codes allow you to reset the printer, change type styles and sizes, and enable or disable boldface printing. These codes can consist of any combination of printable or nonprintable characters that are specific to the printer you're using. You can direct control codes to the printer in several different ways:
Use combinations of CHR( ) and quoted strings concatenated with + to send ASCII characters directly to the printer.
Use quotation marks to send a string containing printer codes or ASCII characters.
Codes can be sent to the printer before printing begins and after printing ends with the _PSCODE and _PECODE system variables. For more information, see _PSCODE and _PECODE.
Printer control codes vary from printer to printer. The best source for information about printer control codes is the manual that came with your printer. |
|
回頂端 |
|
 |
goto-dream
註冊時間: 2004-05-11 文章: 909
第 3 樓
|
|
回頂端 |
|
 |
spfrk
註冊時間: 2004-11-08 文章: 163
第 4 樓
|
發表於: 星期一 十二月 06, 2010 9:16 am 文章主題: |
|
|
有些中文字內碼含有 '{' chr(123), ??? 會將 { 視為巨集, 因此導致無法顯示中文字, 因此在使用 ???
指令前, 必須先逐 byte 判斷, 如碰到 { ,則必換成 {{, 這樣才能正確的列印出中文 |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|