Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2008, 01:48 PM
Authorized User
 
Join Date: Sep 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to transfer value from one form to another

hi to all. i want to know
1) how i can transfer values from one form to another which are entered by users.
2) is this possible to write something on window form without any control. mean i want to show values to user on form not on any control.

please give reply soon

Thank you in advance.



 
Old July 27th, 2008, 02:42 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

There are several ways to transfer data from form to form.

- Create a object to hold the data, and pass it to the form in its constructor.
- Define a property in the target form and set that to the value(s) you want.
- Save data in a backend database/file and read the contents.
- Raise events which can then be consumed, with the data in the EventArgs.

Use of these will vary from situation to situation.. The most common most likely being the first..

As for your second question. If you mean render it DIRECTLY on the form, you will need to paint the data manually. Although, I would strongly advise against this, since controls do a LOT of "unseen" work, especially when it comes to working with the OS (such as rendering things nicely, tab support, positioning and resize handling etc).

Perhaps trying explaining the problems you are approaching so we can offer better advice?

Rob
http://cantgrokwontgrok.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to transfer data from one php form to another [email protected] PHP How-To 2 November 27th, 2006 08:47 AM
Transfer control value from a Form to Subform jimmy0305 Access VBA 1 March 16th, 2006 03:13 PM
Code transfer to form!field Quixote Access VBA 1 July 11th, 2005 09:51 AM
Transfer of Form Values in Javascript pkdev Javascript How-To 3 June 21st, 2004 05:15 AM
Form data won't transfer to next screen wjenkins Javascript How-To 2 September 8th, 2003 10:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.