Re: Beginner: Referencing a control on another form
From: Dave (davefrick_at_newsgroup.nospam)
Date: 12/06/04
- Next message: Shiva: "Re: how to get number of printout copies while using printerdialog box using c#.net"
- Previous message: bns: "COM Introp warning"
- In reply to: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Next in thread: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Reply: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 6 Dec 2004 05:49:21 -0800
ahh..now I understand better.
Thanks for the insight. And for the link.
Dave
"Steven Cheng[MSFT]" <v-schang@online.microsoft.com> wrote in message
news:ytxHlR32EHA.3200@cpmsftngxa10.phx.gbl...
> Hi Dave,
>
> As for the question you mentioned, I think Deepak's suggestion on apply a
> MVC pattern is quite reasonable. For such scenario, we need to separate
> the
> data with the displaying UI. Just use the more specific question you
> mentioned:
> Form1 has txt1 which display the total count
>
> Form2 has txt2 which accept the user's new input
>
> Then, Form1 and Form2 and all the controls on them are the UI, and the
> actual data should be maintained in the application in separate place. We
> can use a custom class (has a member variable ), for example named
> "CountManager" to hold the total count. Then, when the user input new
> value
> in the Form2's txt2 and click OK to submit it. We hide Form2 and update
> the
> value in the custom class, just like:
>
> CountManager.Total + = txt2.newValue;
> Form2.Hide
>
> Then, make Form1 visible, that'll fire the Form1's Activate event, and in
> this event , we need to update the Form1's UI from the DAta
> Store(CountManager.Total).
>
> So this is a general progress of interaction between two forms. We can
> abstract the progress as :
>
> User change the UI(input) -----> update the data in data store(in
> memory
> or other storage) ----------> fire event to Refresh UI ------> UI
> retrieve updated data from data store and update it self.
>
> Here is the reference on the UI process Application block in MSDN:
>
> #User Interface Process Application Block for .NET
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/
> uip.asp
>
> Hope also helps. thanks.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
- Next message: Shiva: "Re: how to get number of printout copies while using printerdialog box using c#.net"
- Previous message: bns: "COM Introp warning"
- In reply to: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Next in thread: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Reply: Steven Cheng[MSFT]: "Re: Beginner: Referencing a control on another form"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|