Jump to content


Photo

call procedure/function on other form

call procedure/function on o

  • Please log in to reply
2 replies to this topic

#1 donlego

donlego

    Member

  • Members
  • PipPip
  • 12 posts

Posted 14 September 2017 - 06:38 AM

hi..

is there any way to call function / procedure on other form like

if i have function/procedure on form  error

i create procedure like this

procedure TFrmError.Run(arun: integer; acaption: string; errornya: tstringlist);
var FrmError:TUniForm;
begin
  screen.Cursor := crhourglass;
  FrmError := TFrmError.Create(nil);
  with FrmError do
  begin
    try

      Caption := acaption;
      if caption = '' then caption := 'Error';
      caption := application.Title;
      Memo1.Text := errornya.Text;

      Memo1.Color := color;
      if FileExists(ExtractFilePath(Application.ExeName) + 'img\error.png') then
        Image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName) + 'img\error.png');
      FormStyle := fsStayOnTop;

      ShowModal;
    finally
      screen.Cursor := crDefault;
      FreeAndNil(FrmError);
    end;
  end;
end;

how i call that form procedure or function from another form ?

 

 

 

thanks


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3480 posts

Posted 14 September 2017 - 09:07 AM

Hi,

 

Which edition and build are you using ?!

 

Best regards,


  • 0

#3 donlego

donlego

    Member

  • Members
  • PipPip
  • 12 posts

Posted 14 September 2017 - 01:33 PM

I use last unigui trial on unigui website with delphi xe7
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users