Form47是我的报表窗体,如果预览后最小化该窗体,则怎么也找不到最小化的窗体了Form47 := TForm47.Create(Application);
try
  Form47.QuickRep1.Preview;
finally
  Form47.free;
end;请问这类问题如何解决?能不能动态修改让用户不能按下最小化键,或干脆隐藏最小化键,请给出代码?对报表预览窗体设Form的BorderIcon的biMinimize属性为false无效,why?

解决方案 »

  1.   

    with TForm47.Create(Application) do
    try
      QuickRep1.Preview;
      ShowModal;  // 这句该有吧?
    finally
      free;
    end;
      

  2.   

    ShowModal?
    什么意思?
    报表预览QuickRep1.Preview就行了!
      

  3.   


         if RepForm = nil then
         begin
              //RepForm:=TRepForm.create(application);
              if RepForm = nil then
                   Application.CreateForm(TRepForm, RepForm);
              RepForm.Hide;
              RepForm.QRLabel3.Caption := '客户名称';
              RepForm.QRLabel13.Caption := datetostr(lsjl.datecontrol.DateTime);
              RepForm.SeekData;
              RepForm.quickrep1.preview;
              //RepForm.show;
         end
         else
         begin
              RepForm.QRLabel3.Caption := '客户名称';
              RepForm.QRLabel13.Caption := datetostr(lsjl.datecontrol.DateTime);
              RepForm.SeekData;
              RepForm.quickrep1.preview;
              RepForm.bringtofront;
         end;