把窗口的FormStyle设置为fsStayOnTop。
解决方案 »
- 怎么判断指定窗口是否在激活状态
- BDE ADO 效率那个高啊,迷惑
- 请问如何让windows.beep从声卡发声?
- 关于Treeview和数据库连接的问题
- 什么叫左连接,右连接,子表?
- ActiveSkin4的使用?
- 如何利用SHFileOperation函数实现直接删除,不放入回收站!!!
- 2个字符串,取公有字符问题
- where to download reportbuilder 6.0 above for delphi5
- 我问一个愚蠢的问题,一次最多能给多少分?
- “Error creating cursor handle”,使用TStoredProc时的错误。
- 有个问题想请教一下,很容易!关于窗体的。
出来,就像delphi中按F11就出现属性窗口一样。但现在我的问题是:chatform的visible开始时是false,当程序执行到一定时候,我设chatform.visible:=true;chatform.show;这时chatform出现了,但他在原来窗口的后面(原来窗口比chatform大)所以看不见,我用了chatform.bringtofront,还是没用,chatform不能获得焦点到原来窗口的前面,不知道为什么?
改为
chatform.showmodal;
chatform.setfocus;
procedure Teditform.TreeViewChange(Sender: TObject; Node: TTreeNode);
var
// editnode :Ttreenode;
i :integer;
begin
if (treeview.Selected.Text ='Editing') then
begin
editselect:=true;
end;
if (treeview.Selected.Text ='Chat') then
begin
chatselect:=true;
chatform.Show; //关键是这两句
chatform.SetFocus ;
end;
if (editselect and (not chatselect)) or ((not editselect) and chatselect) then
begin
newsession.Enabled :=true;
speedbutton1.Enabled :=true;
end;
for i:=0 to loginform.sessionnum -1 do
begin
if (not jionclick) and (treeview.Selected.Text =loginform.sessionarr[i].theme) then
begin
select:=true;
end;
end;
if chatselect then
begin
chatform.Visible :=true;
statusbar1.Panels[0].Text :='If you want to see whiteboard,please press f2!';
end;
chatselect:=false;
editselect:=false;end;
大家给我看看到底是为什么?为什么把这两句放在这个事件中就不行?谢谢!
然后在需要显视时设置chatform.Visible为true
反之则chatform.Visible为false