HOW TO PRINT FILE TO NOTEPAD IN GUI?

DEFINE VARIABLE ReturnCode AS INTEGER NO-UNDO.

PROCEDURE WinExec EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER ProgramName AS CHARACTER.
DEFINE INPUT PARAMETER VisualStyle AS LONG.
DEFINE RETURN PARAMETER StatusCode AS LONG.
END PROCEDURE.

/**************************************************/
/* NOTE: VisualStyle parameters are as follows: */
/* 1 = Normal */
/* 2 = Minimized */
/**************************************************/

RUN WinExec (INPUT "notepad c:log.txt", INPUT 1, OUTPUT ReturnCode).

IF ReturnCode >= 32 THEN
MESSAGE "Application was Started" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "Application Failed" VIEW-AS ALERT-BOX.

/****************************************************/
/* RETURN CODE DESCRIPTION */
/* If the function is successful, the return value */
/* from WinExec identifies the instance of the */
/* loaded module. Otherwise, the return value is an */
/* error value between 0 and 32. */
/* */
/* 0 System was out of memory, executable */
/* file was corrupt, or relocations */
/* were invalid. */
/* 2 File was not found. */
/* 3 Path was not found. */
/* 5 Attempt was made to dynamically link */
/* to a task, or there was a sharing or */
/* network protection error. */
/* 6 Library required separate data */
/* segments for each task. */
/* 8 There was insufficient memory to */
/* start the application. */
/* 10 Windows version was incorrect. */
/* 11 Executable file was invalid. Either */
/* it was not a Windows application or */
/* there was an error in the .EXE image.*/
/* 12 Application was designed for a */
/* different operating system. */
/* 13 Application was designed for */
/* MS-DOS 4.0. */
/* 14 Type of executable file was unknown. */
/* 15 Attempt was made to load a real-mode */
/* application (developed for an earlier*/
/* version of Windows). */
/* 16 Attempt was made to load a second */
/* instance of an executable file */
/* containing multiple data segments */
/* that were not marked read-only. */
/* 19 Attempt was made to load a compressed*/
/* executable file. The file must be */
/* decompressed before it can be loaded.*/
/* 20 Dynamic link library (DLL) file was */
/* invalid. One of the DLLs required to*/
/* run this application was corrupt. */
/* 21 Application requies Microsoft */
/* Windows 32-Bit extensions. */
/****************************************************/

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/443058/viewspace-914010/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/443058/viewspace-914010/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Microsoft Print to PDF是一种虚拟打印机,它允许用户将文件以PDF格式保存。\[1\]如果你想设置Microsoft Print to PDF的分辨率,可以按照以下步骤进行操作:首先,打开C:\Windows\System32\spool\V4Dirs目录,找到后缀是.gpd和.xml的文件,用记事本或者Notepad++打开。如果在文件中找到了microsoftprinttopdf字样,那么就是这个文件夹了。\[2\]然后,打开Word文档,选择“文件-打印”,选择“Microsoft Print to PDF”打印机,点击“打印机属性-高级-图形-打印质量选择1200*1200"。这样打印出来的图片就会非常高清,并且不受商用字体的限制。\[3\]希望这些步骤对你有帮助! #### 引用[.reference_title] - *1* *2* [Microsoft print to pdf 设置分辨率](https://blog.csdn.net/weixin_42135811/article/details/116271478)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [word转pdf时图片模糊+文字版权的有效处理方式——Microsoft Print to PDF(YYDS)](https://blog.csdn.net/weixin_44428483/article/details/119576580)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值