J
jez
Hi guys,
I read a couple of old posts about multiple forms and am still puzzled about
2 issues :
1) does opening one extra form really slow down the entire app ?
2) Ginny strongly adviced against the use of global variables
More details :
1) So far I have one form with 4 tabs. In one of these tabs I'd like to open
an extra floating form with four controls on it. It would be used to enter a
number in a textBox then click on a button that would close the form. That
number would then be used with some more information from the first form to
add a row to a DataTable. Would I complicate my life if I were to create
such a form and make sure that I get the text from the textBox on that
second form ?
2) If I do decide to do so could someone provide me with a little snippet of
code to get data from another Form ? I tried to create a public method that
returns data from the first form but it doesn't seem to work..
Something like :
public string getCustomerId () {
return customerId;
}
When I'm in my second form I type Form1. but the intelliSense doesn't find
that method - what's wrong ?
thanks all for the help !
I read a couple of old posts about multiple forms and am still puzzled about
2 issues :
1) does opening one extra form really slow down the entire app ?
2) Ginny strongly adviced against the use of global variables
More details :
1) So far I have one form with 4 tabs. In one of these tabs I'd like to open
an extra floating form with four controls on it. It would be used to enter a
number in a textBox then click on a button that would close the form. That
number would then be used with some more information from the first form to
add a row to a DataTable. Would I complicate my life if I were to create
such a form and make sure that I get the text from the textBox on that
second form ?
2) If I do decide to do so could someone provide me with a little snippet of
code to get data from another Form ? I tried to create a public method that
returns data from the first form but it doesn't seem to work..
Something like :
public string getCustomerId () {
return customerId;
}
When I'm in my second form I type Form1. but the intelliSense doesn't find
that method - what's wrong ?
thanks all for the help !