Sunday, 26 October 2014

Pass value from one form too another


Today i needed to transfer a value from  textbox on one form to a textbox on another. Know i know that it may sound simple which it is but i decided to look at how to do it properly. What i found was a very complicated ways of doing this so i just did it my way the simple way.



  1. Create a global variable that you can use for any string lets say gstr
  2. Pass the value of the textbox to the variable gstr = textbox1.text.
  3. On the other form add textbox1.text = gstr
When the second form receives the focus the textbox will populate. This method can be yes to transfer most data from one form to another.




No comments:

Post a Comment

Chrome 138 the last supported

Chrome 138 the last supported  Hey Everyone, Chrome 138 is the last version of Chrome that will support Android 8.0 (Oreo) and Android 9.0 (...