From: "Nemesis" Subject: Re: How to use the enumdisplaydevices function Date: 06 May 2000 00:00:00 GMT Message-ID: <8evgd3$jbf4@bornews.borland.com> References: <8ev0uf$ffn2@bornews.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.delphi.graphics I already found it this is how it should be used : procedure TForm1.Button2Click(Sender: TObject); var lpDisplayDevice: TDisplayDevice; dwFlags: DWORD; cc: DWORD; begin lpdisplaydevice.cb := sizeof(lpdisplaydevice); dwflags := 0; cc:= 0; while EnumDisplayDevices(nil, cc, lpDisplayDevice , dwFlags) do begin inc(cc); listbox1.items.add(lpdisplaydevice.DeviceString); end; end; Nemesis wrote in message news:8ev0uf$ffn2@bornews.borland.com... > Can someone help me with how I should use the EnumDisplayDevices function ? > > It's not documented in the Delphi Help files, but there's some information > on > > http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/gdi/devcons_ > 2303.htm > > > I haven't gotten any further than the following snippet, and it doesn't seem > to work..... > > procedure TForm1.Button2Click(Sender: TObject); > var lpDisplayDevice: TDisplayDevice; > dwFlags: DWORD; > cc : integer; > begin > lpdisplaydevice.cb := sizeof(lpdisplaydevice); > cc:= 0; > while EnumDisplayDevices(nil, cc, lpDisplayDevice , dwFlags) do > begin > inc(cc); > listbox1.items.add(lpdisplaydevice.DeviceName); > end; > end;