chechy(chechy):我要的是前系统默认打印机的信息,不是系统中所有打印机的列表

解决方案 »

  1.   

    TPrinter.PrinterIndex指向当前的打印机。
      

  2.   

    用API:DeviceCaabilities
    The DeviceCapabilities function retrieves the capabilities of a printer device driver. DWORD DeviceCapabilities(    LPCTSTR pDevice, // pointer to a printer-name string 
        LPCTSTR pPort, // pointer to a port-name string 
        WORD fwCapability, // device capability to query 
        LPTSTR pOutput, // pointer to the output 
        CONST DEVMODE *pDevMode  // pointer to structure with device data  
       );
      

  3.   

    chechy(chechy):我用label1.caption:=Printer.Printers.names[printer.printerindex];
    但label1却什么也没显示
      

  4.   

    写错了,应该是
    label1.caption:=Printer.Printers[printer.printerindex];
      

  5.   

    在win98下如果仅取前三项可以从win.ini中很容易获得,在win2000下应该是在注册表的某个位置,信息很全。
      

  6.   

    chechy(chechy):打印机名称取得了,但是其它信息在哪取,请帮帮忙
      

  7.   

    chechy(chechy):有没有这方面的详细资料,给我一份好吗?[email protected]
      

  8.   

    我就不知道了,大概要用API函数了。我没有接触过这方面的内容。你在MSDN中找吧。
    dancemaple(枫之舞) 说的也许有理。
      

  9.   

    《DELPHI5开发人员指南》上说的很清楚了
    看看就知道了
      

  10.   

    详细的包括代码可以参看:
     delphi5开发人员指南 黄色封面 机械工业出版社,( 292 页 )
    正本书约厚 5公分.^-^
    还讲述了有关delphi这部分的封装的问题。