# Re: 急问: 找回预设列表机?

Posted by Rose on August 26, 1998 at 15:59:12:

In Reply to: Re: 急问: 找回预设列表机? posted by cckannie on August 24, 1998 at 15:55:19:

: : : 只是想请教各位高手, 如何取出目前windows的预设列表机值而已.
: : 我是这样取预设印表机的,你试试
: : Dim Length As Long
: : dim DefPrinter as string
这里要加上
DefPrinter=string(80,chr(0))

: : Length = GetProfileString("windows", "device", "", DefPrinter, Len(DefPrinter))
: : DefPrinter = Left(DefPrinter, Length)

: 我已测试过您的方式, 得到Length=0, DefPrinter="",
: 请问这结果是正常的吗?
: 那我应如何将列表机设定此预设值呢?

Follow Ups: