Re: To Increase Speed of an application

"Felipe Rezek Mohallem" <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
try Application.FindComponent

procedure TFrmMain.frm1Click(Sender: TObject);
var
  I,j: Integer;
begin
  j:=0;
  if ChkPlant() = false then
   exit;
  Screen.Cursor := crHourglass;
  try
    if not application.Findcomponent ( 'FRM1' ) then
      FRM1 := Tfrm1.Create ( Self );

    frm1.ShowModal;
    frm1.Free;
    frm1 := nil;        // don't forget this
  finally
    Screen.Cursor := crDefault;
  end;
end;

Best regards,
Felipe
  ----- Original Message ----- 
  From: arin_mitra_2000 
  To: [email protected] 
  Sent: Thursday, July 31, 2003 9:02 AM
  Subject: [Delphi] To Increase Speed of an application


  We are facing a typical problem while calling a form from a menu...we 
  are using following sequences..


  procedure TFrmMain.frm1Click(Sender: TObject);
  var
    I,j: Integer;
  begin
    j:=0;
    if ChkPlant() = false then
     exit;
    Screen.Cursor := crHourglass;
    for I := 0 to Screen.CustomFormCount-1 do
      if Screen.CustomForms[I].Name = 'FRM1' then j:=1;
     if j=0 then
        Application.CreateForm(TFRM1,FRM1);
    FRM1.ShowModal ;
    FRM1.free;
    Screen.Cursor := crDefault;
  end;

  Can u please help us any alternative to call a form to increase the 
  speed

  Arindam



        Yahoo! Groups Sponsor 
              ADVERTISEMENT
             
       
       

  CodeCoffer - new Delphi code protection Tool!
  http://www.delphicollection.com/public/CodeCoffer.htm
  ---------------------------------------------------------------
  Unsubscribe:[email protected]
  List owner:[email protected]
  --------------------------------------------------------------- 

  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.