Home All Groups Group Topic Archive Search About
Author
13 May 2009 4:41 PM
gerryR
Hi

I'm working on a fairly simple app comprising of 4 forms.

On the 1st form it shows some stats from 2 txt file it links too (how many
lines etc).

On Form 2 it allows you to add info to one of the txt files.

I open Form 2 when wanting to add another record using Form2.ShowDialog()
When I've added the link and clicked save I close form2 with Close().  The
the focus is back on form 1

Is there anything I can do to automatically refresh form1 so that the stats
update once I close form 2?

Thanks
Gerry

Author
13 May 2009 5:09 PM
Cor Ligthert[MVP]
Gery

Use dataBinding.

Be aware that it is good practice to close a showdialog form with dispose.
It has unmanaged resources.

Cor



Show quoteHide quote
"gerryR" <gerryr@noSPAM.com> wrote in message
news:OpLv$m%230JHA.4288@TK2MSFTNGP04.phx.gbl...
> Hi
>
> I'm working on a fairly simple app comprising of 4 forms.
>
> On the 1st form it shows some stats from 2 txt file it links too (how many
> lines etc).
>
> On Form 2 it allows you to add info to one of the txt files.
>
> I open Form 2 when wanting to add another record using Form2.ShowDialog()
> When I've added the link and clicked save I close form2 with Close().  The
> the focus is back on form 1
>
> Is there anything I can do to automatically refresh form1 so that the
> stats
> update once I close form 2?
>
> Thanks
> Gerry
>
>
Author
14 May 2009 7:43 AM
gerryR
Thanks Cor, I'll have a look at dataBinding and dispose.

gR


Show quoteHide quote
"Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl> wrote in message
news:uAk7S2%230JHA.4352@TK2MSFTNGP05.phx.gbl...
> Gery
>
> Use dataBinding.
>
> Be aware that it is good practice to close a showdialog form with dispose.
> It has unmanaged resources.
>
> Cor
>
>
>
> "gerryR" <gerryr@noSPAM.com> wrote in message
> news:OpLv$m%230JHA.4288@TK2MSFTNGP04.phx.gbl...
>> Hi
>>
>> I'm working on a fairly simple app comprising of 4 forms.
>>
>> On the 1st form it shows some stats from 2 txt file it links too (how
>> many
>> lines etc).
>>
>> On Form 2 it allows you to add info to one of the txt files.
>>
>> I open Form 2 when wanting to add another record using Form2.ShowDialog()
>> When I've added the link and clicked save I close form2 with Close().
>> The
>> the focus is back on form 1
>>
>> Is there anything I can do to automatically refresh form1 so that the
>> stats
>> update once I close form 2?
>>
>> Thanks
>> Gerry
>>
>>
>