创建窗体的类的问题(40)

  • 主题发起人 主题发起人 ado7758
  • 开始时间 开始时间
A

ado7758

Unregistered / Unconfirmed
GUEST, unregistred user!
for i:=0 to Screen.FormCount-1 do if InstanceClass=Screen.Forms.ClassType then begin if Screen.Forms.WindowState=wsMinimized then Screen.Forms.WindowState:=wsNormal; Screen.Forms.show; exit; end; try Screen.Cursor:=crHourGlass; Instance := TComponent(InstanceClass.NewInstance); TComponent(Reference) := Instance; try Instance.Create(Application); except TComponent(Reference) := nil; raise; end; if (Instance is TForm) then with Instance as TForm do begin if FormStyle=fsNormal then begin FormStyle:=fsMDIChild; Visible:=True; end; end; finally Screen.Cursor:=crDefault; end;这个要怎么改成 显示在屏幕的前面 不好意思 分数不多
 
FormStyle:=fsMDIChild; 改成 FormStyle:=fsstayontop; 看看吧
 
后退
顶部