DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: update controls

  1. #1
    tiak Guest

    update controls


    Hi

    On a form opening I need to have the value of a contol (text box) update
    automically from the value of a calclated control (text box) in another form.

    Thanks in adv.

  2. #2
    Arthur Wood Guest

    Re: update controls


    tiak,
    Rather than have one form have a hard-coded reference to another form
    (which is very poor programming style), what you can do is to create a Public
    Property Get method in the form that you are opening, and before you want
    to open that form (create an object variable which point to the form), set
    the property, and then in the Form Load event, place the property value in
    the appropriate text box. This makes the code much mode object oriented,
    and completely encapsualtes the functionality fo each form.

    If you need some more help, just ask.

    Arthur Wood

    "tiak" <sjt141@netscape.net> wrote:
    >
    >Hi
    >
    >On a form opening I need to have the value of a contol (text box) update
    >automically from the value of a calclated control (text box) in another

    form.
    >
    >Thanks in adv.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center