formsdelphilazarusfpc

Passing data between forms - Ajax Comparison


I made a question that looked like this before and people didn't understand. I'll try to be more concise and will use a comparison with Ajax used in web applications.

I have the main form. There I have one button that will extract data from a field and send to a second form, a window that will pop up and display the data in a more organized way (A TListBox).

I would like to know if there is a way to on SecondForm.Show to send this data as parameters, like SecondForm.Show(data).

The comparison to Ajax is that when you make an Ajax Call from a html page to the server, you send encapsulated data, the server receives it and works with it.

I want my main form to send the data, the second form to receive the data and use it.

Is it possible? How?


Solution

  • Decide in what form to send the data from Main to SecondFrom. For instance in a TStringList. Fill the striglist on the mainform, use it as parameter in SecondForm.Show.