.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> Windows Form Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Transferring Values From One Form to Another in windows application

Posted By:Hefin Dsouza       Posted Date: August 13, 2009    Points: 10    Category: Windows Form Controls    URL: http://www.dotnetspark.com  

This code will help you to Transfer Values From One Form to another Using Windows Application.

This is an simple Scenario where The First Form Has a Button and A text box

When the user clicks on the Button the second form pops up which has only one textbox when the user types in the Second Forms textbox and closes the Form the Textbox value passes to the First Form's textbox.

Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Form1.TextBox1.Text = TextBox1.Text
End Sub

Hefin Dsouza


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend