|
-
June 4th, 2003, 03:25 AM
#1
appending data into a file.
suppose i have 2 different forms. if i click a button in first for i will get second form ,and now i have to generate a file which contains data of both the forms. so i need to append the data.
how to do it.pls help me.
srinivas
-
June 4th, 2003, 06:56 AM
#2
what do you mean "a file which contains data of both the forms"? An INI? A Frm? please be more specific.
Mike
-
June 4th, 2003, 07:20 AM
#3
i guess u would like to write to a text file.
where have u stored data in your form ?
whereever it may be, u can refer controls of one form from another by refereing as formname.controlname
suppose if u have some content in in a textbox in form1 and u wanna access it form2, u can access it as form1.text1.text
be more specific if this is not what u required!
regards
madhu
-
June 4th, 2003, 07:36 AM
#4
You need to declare public variables and every time you need to switch to the other form, just set the appropriate values to your variables.
i.e.
you have a textbox in your first form (txtName).
you declare a public variable "varName"
you write there "My name"
Now you need to press the button that sends you to your second form.
In the button s "click" event write the following code
"varName = txtName.text"
so, when you will be in the second form the value "My name" is stored in the variable "varName".
Do the same for all the data you need from your first form
klain main froilain...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|