AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Listview + Stateindex

Ein Thema von Piro · begonnen am 26. Nov 2004 · letzter Beitrag vom 26. Nov 2004
 
Benutzerbild von Piro
Piro

Registriert seit: 14. Jul 2003
Ort: Flintbek
810 Beiträge
 
Delphi XE2 Professional
 
#5

Re: Listview + Stateindex

  Alt 26. Nov 2004, 13:53
hier der Code:

Delphi-Quellcode:
function listview_erstellen: boolean;
var
 ListItem : TListItem;
 sOwner, sOrganization: string;
begin
 GetOwnerAndCompanyName(sOwner, sOrganization);
 with frm_main.lv_systeminfo do
 begin
   ListItem := Items.Add;
   ListItem.Caption := 'Computer';
   ListItem.StateIndex := 0;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Betriebssystem';
   ListItem.SubItems.Add(DataModule1.PJSysInfo1.OSProductName + ' ' +
                         DataModule1.PJSysInfo1.OSProductType);
   ListItem.ImageIndex := 1;

   ListItem := Items.Add;
   ListItem.Caption := 'Version';
   ListItem.SubItems.Add(GetVersion);
   ListItem.ImageIndex := 2;

   ListItem := Items.Add;
   ListItem.Caption := 'CPU';
   ListItem.SubItems.Add(GetProzessorName);
   ListItem.ImageIndex := 3;

   ListItem := Items.Add;
   ListItem.Caption := 'Arbeitsspeicher';
   ListItem.SubItems.Add(GetMemoryInfo);
   ListItem.ImageIndex := 4;

   ListItem := Items.Add;
   ListItem.Caption := 'OS Service Pack';
   ListItem.SubItems.Add(DataModule1.PJSysInfo1.OSServicePack);
   ListItem.ImageIndex := 5;

   ListItem := Items.Add;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Netzwerk';
   ListItem.StateIndex := 6;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Computername';
   ListItem.SubItems.Add(DataModule1.PJSysInfo1.ComputerName);
   ListItem.ImageIndex := 0;

   ListItem := Items.Add;
   ListItem.Caption := 'Benutzername';
   ListItem.SubItems.Add(DataModule1.PJSysInfo1.UserName);
   ListItem.ImageIndex := 7;

   ListItem := Items.Add;
   ListItem.Caption := 'Arbeitsgruppe / Domäne';
   ListItem.SubItems.Add(GetDomainName);
   ListItem.ImageIndex := 8;

   ListItem := Items.Add;
   ListItem.Caption := 'IP Adresse';
   ListItem.SubItems.Add(GetIpAddress);
   ListItem.ImageIndex := 9;

   ListItem := Items.Add;
   ListItem.Caption := 'MAC Adresse';
   ListItem.SubItems.Add(GetMACAddress);
   ListItem.ImageIndex := 9;

   ListItem := Items.Add;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Anzeige';
   ListItem.StateIndex := 10;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Grafikkarte';
   ListItem.SubItems.Add('keine Angabe');
   ListItem.ImageIndex := 10;

   ListItem := Items.Add;
   ListItem.Caption := 'Auflösung';
   ListItem.SubItems.Add(GetResolution);
   ListItem.ImageIndex := 10;

   ListItem := Items.Add;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Lizensinformationen';
   ListItem.StateIndex := 11;
   ListItem.ImageIndex := -1;

   ListItem := Items.Add;
   ListItem.Caption := 'Registrierter Eigentümer';
   ListItem.SubItems.Add(sOwner);
   ListItem.ImageIndex := 12;

   ListItem := Items.Add;
   ListItem.Caption := 'Registrierte Organisation';
   ListItem.SubItems.Add(sOrganization);
   ListItem.ImageIndex := 12;

   ListItem := Items.Add;
   ListItem.Caption := 'Produkt ID';
   ListItem.SubItems.Add(GetProductID);
   ListItem.ImageIndex := 11;
 end
end;

...
procedure Tfrm_main.FormShow(Sender: TObject);
begin
 lv_systeminfo.Clear;
 listview_erstellen;
end;
Ich hoffe es hilft dir. Und weißt die Lösung
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:49 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