[progress Communities] [progress Openedge Abl] Forum Post: Re: .net Printersettings

  • Thread starter Thread starter joey eisma
  • Start date Start date
Status
Not open for further replies.
J

joey eisma

Guest
hi, I tried below the DEVMODE structure as well. still no luck. DEFINE VARIABLE bOK AS LOGICAL NO-UNDO. SYSTEM-DIALOG PRINTER-SETUP UPDATE bOK. if not bOk then return. DEFINE VARIABLE lpPrintDlg AS INTEGER NO-UNDO. RUN GlobalLock(SESSION:PRINTER-CONTROL-HANDLE, OUTPUT lpPrintDlg). DEFINE VARIABLE PrintDlg AS MEMPTR NO-UNDO. SET-POINTER-VALUE(PrintDlg) = lpPrintDlg. DEFINE VARIABLE hDevMode AS INTEGER NO-UNDO. DEFINE VARIABLE lpDevMode AS INTEGER NO-UNDO. hDevMode = GET-LONG(PrintDlg, 9). RUN GlobalLock(hDevMode, OUTPUT lpDevMode). def var ps2 as System.Drawing.Printing.PrinterSettings. ps2 = new System.Drawing.Printing.PrinterSettings(). ps2:SetHdevmode (new System.IntPtr(hDevMode)). /* test if pointing to the same structure */ MESSAGE ps2:Copies VIEW-AS ALERT-BOX INFO BUTTONS OK. however, if i have 2 PrintDialog and do something like pd2:PrinterSettings:SetHdevmode(pd1:PrinterSettings:GetHdevmode), they would be looking at the same devmode structure. this is i essentially trying to do, use .net to manage the structure but, use ABL to bring the printer dialog. TIA.

Continue reading...
 
Status
Not open for further replies.
Back
Top