VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

??? 的問題

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
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 樓

發表發表於: 星期六 十二月 04, 2010 10:42 am    文章主題: 引言回覆

??? CHR(27)+"M"
這行不要
你多下了

_________________
福隆昌淨水有限公司--淨水器的專家,淨水器,飲水機,濾心!!

想了解更多,您可上幸福雞湯組.找尋!!丁澐瑄.老師.

          愛作夢
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件
spfrk



註冊時間: 2004-11-08
文章: 163


第 4 樓

發表發表於: 星期一 十二月 06, 2010 9:16 am    文章主題: 引言回覆

有些中文字內碼含有 '{' chr(123), ??? 會將 { 視為巨集, 因此導致無法顯示中文字, 因此在使用 ???
指令前, 必須先逐 byte 判斷, 如碰到 { ,則必換成 {{, 這樣才能正確的列印出中文
回頂端
檢視會員個人資料 發送私人訊息
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作