I have the same issue with filter forms.
The user enters some search criteria and clicks ok.
This search criteria must be maintained.
The way i do this:
Main Topics
Browse All TopicsHi there,
What I got is a bunch of dialogs that I create at run time, ask the user some stuf and then close.
ie
With TMyDialog.Create(self) do
try
ShowModal;
{ do something }
finally
Free;
end;
which works fine, excpet what I want to do is next time the user loads that up, keep all the values they entered in there.
I only need to keep them for this instance of the program running, so it they close the program and restart the values should be cleared.
I COULD Load and Save values to an ini / registry each time, but I thought i've seen somewhere (maybe a Jedi component) which you can easily save a forms settings (whole thing) and then load it again.
Ring a bell?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
that's the way I do it, of course I rather use object instead of record but this is just quick sample:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TDataToDisplay = record
dtdField1: string;
dtdField2: Integer;
end;
TForm2 = class(TForm)
private
public
function Execute(Data: TDataToDisplay):Boolean;
end;
function ShowSampleDialog(Data: TDataToDisplay):Boolean;
implementation
{$R *.dfm}
function ShowSampleDialog(Data: TDataToDisplay):Boolean;
begin
with TForm2.Create(nil) do
try
Result := Execute(Data);
finally
Free;
end;
end;
{ TForm2 }
function TForm2.Execute(Data: TDataToDisplay): Boolean;
begin
//read FData and fill your components
ShowModal;
Result := ModalResult = mrOk;
// read components and fill Data with new values
end;
end.
procedure TForm1.Button1Click(Sender
var Data: TDataToDisplay;
begin
ShowSampleDialog(Data);
end;
ziolko.
I have a idea: why not stream it to a string and use the string to recreate the dialog?
Hein? WTF? I mean to transform the form on a text and get it back when you
need to recreate it. (Of course, if more convenient, you could save the string
in a file - I didn't that for simplicity sake)
See the code below:
Business Accounts
Answer for Membership
by: JohnjcesPosted on 2008-07-11 at 17:48:43ID: 21987038
Jedi does have a component called JvFormStorage which will store a form's position, height, width, etc as well as changes in some of the components on the form via stored props.
You'll find it under the JvPersistence tab.
John