Autor Beitrag
kingflo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37


D6
BeitragVerfasst: Mi 03.12.03 10:22 
Hallo ich habe wiedermal ne frage
ich habe ein gutes beispiel zur netzwerk auflistung gefunden mit benutze dieses auch in abgeänderter form und habe jetzt ein prob.
aber erstmal der code so liste ich das Netzwerk auf

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
 
procedure TFindComp.ClickMeClick(Sender: TObject); 
var 
 N: TNetworkNeighborhood; 
 List: TStringList; 
 i, j: Integer; 
 ListViewItem: TListItem; 
 WorkgroupNode, ComputerNode: TTreeNode; 
begin 
 Screen.Cursor:=crHourGlass; 
 try 
  // Initializing the objects and scanning a network 
  N:=TNetworkNeighborhood.Create; 
  try 
   // Obtaining the list of all the computers in a local area network 
   Memo1.Lines.Clear; 
   N.ListComputers(Memo1.Lines); 

   // Obtaining the alphbetically sorted list of all the workgroups 
   // and computers in a network 
   List:=TStringList.Create; 
   ListView1.Items.Clear; 
   try 
    N.ListNetwork(List); 
    for i:=0 to List.Count - 1 do begin 
     ListViewItem:=ListView1.Items.Add; 
     ListViewItem.Caption:=List[i]; 
     ListViewItem.ImageIndex:=Integer(List.Objects[i]); 
    end; 
   finally 
    List.Free; 
   end; 

   // Obtaining the tree view of the workgroups and computers in a network 
   TreeView1.Items.Clear; 
   for i:=0 to N.Count - 1 do begin 
    WorkgroupNode:=TreeView1.Items.Add(nil, N[i]); 
    WorkgroupNode.ImageIndex:=1; 
    WorkgroupNode.SelectedIndex:=1; 
    for j:=0 to (N.Objects[i] as TStrings).Count - 1 do begin 
     ComputerNode:=TreeView1.Items.AddChild(WorkgroupNode, (N.Objects[i] as TStrings).Strings[j]); 
     ComputerNode.ImageIndex:=0; 
    end; 
   end; 

  // Obtaining the IP addresses of computers 
  GetIPAddresses(N, Memo2.Lines); 

  finally 
   N.Free; 
  end; 
  TreeView1.FullExpand; 

 finally 
  Screen.Cursor:=crDefault; 
 end; 
end;


so und jetzt möchte ich es aber ganz gerne so haben das ich in einer ListBox (oder einem Memo ganz egal ) die User sehe die das Programm (Ultrax.exe) auch geöffnet haben. Ist das möglich?
kingflo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37


D6
BeitragVerfasst: Mi 03.12.03 12:06 
kein mir da echt keiner helfen? :(