แค่เว็บๆหนึ่ง ! ที่อยากเก็บประสบการณ์
Home
 

Print files from a folder in PowerBuilder 12

You can hook up one of the standard Windows API calls ShellExecute

 Function long ShellExecute( long hwnd,  string lpOperation, string lpFile, string                  
          lpParameters,  string lpDirectory,  integer nShowCmd ) Library "shell32.dll"   
          alias for "ShellExecuteW"

Once you have done this, you can send your path/file to this function and tell it to print, like so:

 integer        li_return_code
 string     ls_null
 long       ll_null

 SetNull(ls_null)
 SetNull(ll_null)

 li_return_code = ShellExecute(ll_null, "print", "C:\File.pdf", ls_null, ls_null, 0)

 ที่มา : http://stackoverflow.com/questions/7669649/print-files-from-a-folder-in-powerbuilder-12

Off 

April 20, 2014 This post was written by Categories: เรื่องเล่ารายวัน No comments yet


Top