programming - basics

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grovisan
    New Member
    • Oct 2006
    • 3

    programming - basics

    I would like to know how to write a part of programm which will be allways executed, not connected to any action. Simply to run it all the time.
    Is it a "sub" program, or what? I don't want to call this part of programm or to start it with some action.

    For example, a value in a text box should allways be sum of values in other two test boxes placed in different form.

    Thank you
  • LacrosseB0ss
    New Member
    • Oct 2006
    • 112

    #2
    Form_Load is a good method to use for that. It runs every time the form is loaded and is run once.

    If you want a text box to default to have a certain value in it when the program starts up, however, simply use the Text feature in the properties box. And type what you want inside.

    Comment

    • albertw
      Contributor
      • Oct 2006
      • 267

      #3
      Originally posted by LacrosseBoss
      Form_Load is a good method to use for that. It runs every time the form is loaded and is run once.

      If you want a text box to default to have a certain value in it when the program starts up, however, simply use the Text feature in the properties box. And type what you want inside.
      hi
      seems changing data in textboxes on different forms is aready action enough to start calculating the sum on the 3rd from :D

      Comment

      • grovisan
        New Member
        • Oct 2006
        • 3

        #4
        it seems i wasn't clear enough.
        what i want is a value in a text box to be summ of other text boxes, places on different forms in project. and this summ should allways be calculated, no mother what action is taken

        if i use Form_load, all operation written in this part of programm are performed only when the form is loaded

        Originally posted by albertw
        hi
        seems changing data in textboxes on different forms is aready action enough to start calculating the sum on the 3rd from :D

        Comment

        • albertw
          Contributor
          • Oct 2006
          • 267

          #5
          Originally posted by grovisan
          it seems i wasn't clear enough.
          what i want is a value in a text box to be summ of other text boxes, places on different forms in project. and this summ should allways be calculated, no mother what action is taken

          if i use Form_load, all operation written in this part of programm are performed only when the form is loaded
          hi

          yes, i understand, but once the answer is placed into this textbox, why should it change?
          there must be a reason... this is a trigger for the program to recalculate.
          even if you change the contents of the 'answer' textbox, you may recalculate using textbox_change( )
          i really don't see the problem.
          why would you recalculate if the answer is still in the textbox?
          further more you can set a timer to calculate every whatever time (interval-property)
          continously running programs are out ever since quickbasic :)
          be happy, and give your pc some rest now and then.

          Comment

          • DeWittds
            New Member
            • Oct 2006
            • 11

            #6
            How about using the "TextBox1_TextC hanged" on each of the textboxes with possible chagning info to recalculated the third box

            Comment

            Working...