Hallo,
I have an application with two forms.
The main form contains 2 labels, one grid (filled with data from a List<class>) and some checkbox to select filters on the data.
The second form (named OverheadWin) contains the same 2 labels and the grid filled with the same data. Its purpose is only to show the information maximized on an extended monitor.
The application works well but the only method that I found to update the second form is closing and reopening it.
I would like to find a more convenient way to refresh the information in the second form from the main form, but so far all the solutions that I tried (like ohdWin.Reresh()) do not work.
I have also tryed with a background worker in the second form that periodically updates the data, but I did not succeed (maybe I do something wrong). The results of my trials were the second form freezed (there is a displacement bar that should work), or the window closing just after opening (the main mehtod of that second form runs only once and the window closes once reached the end of this method).
The current code of the first form is
public partial class MainWin : Form
{
OverheadWin ohdWin;
...
private void OpenOhdWin()
{
ohdWin = new OverheadWin();
ohdWin.Show();
}
The update part, to be improved
ohdWin.Close();
OpenOhdWin();
The main method of the second form: (OhdGridShow shows the data in the label and the grids)
public partial class OverheadWin : Form
{
public OverheadWin()
{
InitializeComponent();
OhdGridShow();
}
Any idea will be welcome.
Thank you in Advance,
David