Advertisement
Advertisement
| 07.16.2008 at 07:29AM PDT, ID: 23569805 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: |
/*
Shows the print dialog box...
Members:
integer FromPage // Print from page
integer ToPage // Print to page
integer MinPage // Min page (smaller page)
integer MaxPage // Max page (higher page)
PROTECTEDWRITE integer Copies = 1 // Nº of copies to
print...
*/
PRINTDLG PrintDlg
DEVMODE DevMode
DEVNAMES DevNames
long pDevNames, pDevMode
blob lb_blob
string lst_prnlist, lst_prnname, ls_temp, ls_fullstring
long ll_pos1, ll_pos2, ll_place
PrintDlg.lStructSize = 66
PrintDlg.hWndOwner = Handle(w_hidden)//hWndParent
PrintDlg.hDevMode = 0
PrintDlg.hDevNames = 0
PrintDlg.hDC = 0
PrintDlg.Flags = Flags
PrintDlg.nFromPage = FromPage
PrintDlg.nToPage = ToPage
PrintDlg.nMinPage = MinPage
PrintDlg.nMaxPage = MaxPage
PrintDlg.nCopies = 0
PrintDlg.hInstance = 0
PrintDlg.lCustData = 0
PrintDlg.lpfnPrintHook = 0
PrintDlg.lpfnSetupHook = 0
PrintDlg.lpPrintTemplateName = "0"
PrintDlg.lpSetupTemplateName = "0"
PrintDlg.hPrintTemplate = 0
PrintDlg.hSetupTemplate = 0
if gst_userPrinterName = "" then
ls_fullstring=PrintGetPrinter()
ll_place=pos (ls_fullstring, "~t")
gst_userPrinterName=left(ls_fullstring, ll_place -1)
ls_temp=mid(ls_fullstring, ll_place +1)
ll_place=pos (ls_temp, "~t")
gst_userPrinterDriver=left(ls_temp, ll_place -1)
gst_userPrinterPort=mid(ls_temp, ll_place +1)
end if
lst_prnlist = PrintGetPrinters ( )
ll_pos1 = pos( lst_prnlist , "~n" )
do while ll_pos1 > 0
ll_pos2 = pos( lst_prnlist , "~t" )
lst_prnname = left( lst_prnlist, ll_pos2 -1 )
If lst_prnname = gst_userPrinterName Then
//
End If
lst_prnlist = right( lst_prnlist, len( lst_prnlist ) - ll_pos1 )
ll_pos1 = pos( lst_prnlist , "~n" )
loop
int ll_test
ll_test = PrintDlgA(PrintDlg)
if ll_test = 1 Then
pDevMode = LocalLock(PrintDlg.hDevMode)
GetDevMode(DevMode,pDevMode,148) // Lock dynamic memory handle
LocalUnlock(pDevMode) // Unlock dynamic memory handle
pDevNames = LocalLock(PrintDlg.hDevNames)
GetDevNames(DevNames,pDevNames,8) // Lock dynamic memory handle
LocalUnlock(pDevNames) // Unlock dynamic memory handle
FromPage = PrintDlg.nFromPage
ToPage = PrintDlg.nToPage
MinPage = PrintDlg.nMinPage
MaxPage = PrintDlg.nMaxPage
Copies = PrintDlg.nCopies
If Copies = 1 Then // Copies are provided by devmode..
Copies = DevMode.dmCopies
End If
int test
test = DevNames.wDeviceOffset
test = test + pDevNames
ls_temp = String(pDevNames + DevNames.wDeviceOffset, "address" ) // format string
lb_blob = blob(ls_temp, EncodingUTF16LE!)
gst_userPrinterName = string(lb_blob, EncodingANSI!) // convert
ls_temp = String(pDevNames + DevNames.wDriverOffset,"address") // format string
lb_blob = blob(ls_temp, EncodingUTF16LE!)
gst_userPrinterDriver = string(lb_blob, EncodingANSI!) // convert
ls_temp =String(pDevNames + DevNames.wOutPutOffset,"address") // format string
lb_blob = blob(ls_temp, EncodingUTF16LE!)
gst_userPrinterPort = string(lb_blob, EncodingANSI!) // convert
//SetPrinter(gst_userPrinterName,gst_userPrinterDriver, //gst_userPrinterPort)
Return(True)
End If
Return(False)
|