![]() |
Monitor Name via Enumdisplaydevices
Ive tried many variations of it.Also Muetze's version.But that can only be used in a listbox.
Is it possible to get a name of monitor based on how many Video cards you have. ( eg. 1: generic monitor on ATI HD 3870 ) ( eg. 2: generic monitor on ATI HD 3870 ) |
Re: Monitor Name via Enumdisplaydevices
Zitat:
The source is definitly not written to just use a TStrings descendant, it was just one possible way to ouptput all informations. All the months or years it is still annoying to see, how your learning process goes (on). |
Re: Monitor Name via Enumdisplaydevices
You are still the same Muetze i can concur to that :P
|
Re: Monitor Name via Enumdisplaydevices
I only needed string not so much as you showed.But tell me if its ok what i modifyed.
Delphi-Quellcode:
function tform4.monitorname(numberof:integer):string; //does cntr control wich outputs is it for couse i have 2 video DVI outputs.
Var Cntr : Cardinal; Info : TDisplayDevice; AdapterName : PChar; OldPos ,j,i : Integer; a:tstringlist; Begin a:=tstringlist.create; Cntr := numberof; Info.cb := SizeOf(Info); While EnumDisplayDevices(Nil, Cntr, Info, 0) Do Begin AdapterName := StrAlloc(SizeOf(Info.DeviceName)); StrCopy(AdapterName, Info.DeviceName); EnumDisplayDevices(AdapterName, 0, Info, 0); a.add(info.DeviceString); for I := 1 to a.count - 1 do begin a.Delete(i); result:=a.Strings[0]; StrDispose(AdapterName); Inc(Cntr); End; End; End; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz