如何在程序内实现是如下步骤:控制面版-》打印机-》默认打印机(如:Epson LQ-1600K)-》属性,
也就是说打开系统默认打印机的属性???

解决方案 »

  1.   

    这个倒是没做过,不过我想一般系统对话框都是在shell32.dll中的。
    而关于打印机的设置是在Prnadmin.dll里面。
    可以去MSDN上面找找这方面的资料。
    等待高手!
      

  2.   

    function DefaultPrinterDevice: string;
    var
      Device, Driver, Port: array [0..255] of Char;
      Mode: THandle;
    begin
      Device := '';
      with Printer do
        if Printers.Count > 0 then
          GetPrinter(Device, Driver, Port, Mode);
      Result := Device;
    end;Function
     SHInvokePrinterCommand(
       wnd: HWND;
       uAction: UINT;
       lpBuf1: PChar;
       lpBuf2: PChar;
       fModal: BOOL
    ): BOOL; stdcall; external 'shell32.dll' name 'SHInvokePrinterCommandA';ShInvokePrinterCommand( handle, 1,
          PChar(DefaultPrinterDevice), nil, true )
      

  3.   

    学习!!!
    补充一下,用楼上大哥的函数前,先uses Printers