Recent

Author Topic: Create Modal Form At Runtime Based On Program Logic Flow  (Read 2449 times)

Rails

  • Guest
Create Modal Form At Runtime Based On Program Logic Flow
« on: September 22, 2013, 02:01:33 am »
Hi,

I need to create a modal form at runtime based on program logic flow instead of user actions or events. Can anyone point me to a good tutorial or example. I've tried searching, but haven't found any clear examples.
 

Thanks,
Rails
 

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Create Modal Form At Runtime Based On Program Logic Flow
« Reply #1 on: September 22, 2013, 02:29:20 am »
Code: [Select]
procedure ShowModalform;
var
  vForm : TMyModalForm;
begin
  vFomr := TMyModalForm.Create(Nil);
  Try
    if vForm.ShowModal = mrOK then begin
      // code to access the data you need.
    end;
  finally
    vForm.Free;
  end;
end;
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Rails

  • Guest
Re: Create Modal Form At Runtime Based On Program Logic Flow
« Reply #2 on: September 22, 2013, 02:57:54 am »
Excellent. That looks a lot simpler than I thought it would be.

Thanks,
Rails

 

TinyPortal © 2005-2018