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

Samsung Android Keyboard

  If you have a Samsung phone or pad and the keyboard is set to Google give the Samsung one a try. Just go into the keyboard settings and ...