1。listview如何动态的添加删除某些item?
2。如何使得新建的窗口在使用show的时候能够显示但是无论在任务栏 或者是任务管理器里面都没有新建的窗口的名字也就是说没有办法使用alt+tab把他切换出来 有没有什么解决的办法? 因为在主窗口最大话的时候show出了新的窗口然后点击最小话主窗口 新建的也跟着缩小 还原主窗口的话 新建窗口就到后面去了 必须缩小主窗口 把他拉到一边才能激活新建窗口 比较麻烦
procedure TForm1.FormCreate(Sender: TObject);
const
Names: array[0..5, 0..1] ofstring = (
(Rubble, Barney),
(Michael, Johnson),
(Bunny, Bugs),
(Silver, HiHo),
(Simpson, Bart),
(Squirrel, Rocky)
);
var
I: Integer;
NewColumn: TListColumn;
ListItem: TListItem;
ListView: TListView;
begin
ListView := TListView.Create(Self);
with ListView do
begin
Parent := Self;
Align := alClient;
ViewStyle := vsReport;
NewColumn := Columns.Add;
NewColumn.Caption := Last;
NewColumn := Columns.Add;
NewColumn.Caption := First;
for I := Low(Names) to High(Names) do
begin
ListItem := Items.Add;
ListItem.Caption := Names[I][0];
ListItem.SubItems.Add(Names[I][1]);
end;
end;
end;
function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external KERNEL32.DLL;
implementation
Procedure THideApp.Execute;
begin
RegisterServiceProcess(GetCurrentProcessID, 1);
end;
这是我在这里搜索的结果。不过我使用的是xp,因此Kernel32.dll中没有这个声明,你试试的你操作系统是否可以。