把窗口的FormStyle设置为fsStayOnTop。
解决方案 »
- cxgrid分组筛选功能
- reset(自身)提示错误?
- 调用word的查找替换问题,怎样才能一次进行全部替换?
- 走過路過千萬別錯過~~~一個挑戰自己的機會!也是某大型企業招聘之題!
- 熱烈祝賀XX新婚快樂,永浴愛河,美滿幸福!
- 在本版上引用了一个函数(DbGrid导出EXCEL)的,请大家指点
- 有一个这样问题,该如何实现?最好能有一些代码,谢谢
- 怎样才能将报表(或窗体上的某个区域)保存为图片???急,给点想法。
- 如何进行注册表CreateKey.请帮忙!(20分)
- delphi中使用fastreport控件时出现class tfrxadodatabase not found错误
- “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