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

Passwords Made Easy

Today i thought i would write about password security. As we are all aware passwords are important but we continue to use very poor password...