Hi,
I have the main form, where from one of the methods, an instance
of another form is created. On the second form I have to fill some
data and be submitted by a button click. The data to be entered is to
be returned to the main form.
A sample of code of my problem.
// main Windows Form
private void EnterDataBtn_Click(object sender, System.EventArgs e)
{
SubForm x = new SubForm();
x.Show();
// here I need to get data that is filled on the sub form
// by doing "string = x.getData();", data entered is not being
// returned. Mainly because it not has been yet submitted
from
// other form.
// I need some sort of event or what?????
}
Please can someone help me out.
Thanks in Advance. 2 11022
Hi,
Declare some public properties in the second form from where you could get
your data back.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m... Hi,
I have the main form, where from one of the methods, an instance of another form is created. On the second form I have to fill some data and be submitted by a button click. The data to be entered is to be returned to the main form.
A sample of code of my problem.
// main Windows Form private void EnterDataBtn_Click(object sender, System.EventArgs e) { SubForm x = new SubForm(); x.Show(); // here I need to get data that is filled on the sub form // by doing "string = x.getData();", data entered is not being // returned. Mainly because it not has been yet submitted from // other form. // I need some sort of event or what????? }
Please can someone help me out.
Thanks in Advance.
Hi Xarky,
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m... Hi,
I have the main form, where from one of the methods, an instance of another form is created. On the second form I have to fill some data and be submitted by a button click. The data to be entered is to be returned to the main form.
A sample of code of my problem.
// main Windows Form private void EnterDataBtn_Click(object sender, System.EventArgs e) { SubForm x = new SubForm(); x.Show(); // here I need to get data that is filled on the sub form // by doing "string = x.getData();", data entered is not being // returned. Mainly because it not has been yet submitted from // other form. // I need some sort of event or what????? }
Please can someone help me out.
Thanks in Advance.
Besides what Ignacio said, you'll want to call Form.ShowDialog rather
than Form.Show. ShowDialog will not return (i.e. it will "wait") until the
form is closed.
Regards,
Daniel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul Bearden |
last post by:
Greetings,
I'm posting a form to a cgi application on another web site. The cgi returns
a text message to the browser. How can I capture this text message and
redirect based on the text.
...
|
by: fig000 |
last post by:
Hi,
I'm relatively new to Javascript so please bear with me on what
might sound like silly questions.
This is what I want to do:
I'm working in classic asp (I have to for this project). I...
|
by: Ryan Mitchley |
last post by:
Hi all
I have the functions
friend CComplexMatrixTemp eye(const size_t nN);
and
friend CComplexMatrixTemp & chol(CComplexMatrixTemp &z);
I would like create expressions of the form...
|
by: RubiconXing |
last post by:
Hi All
Beginner question - please be patient with me :-) I am new to c#.
If one creates a child modal (and also non-modal) form what is the
best way of returning the collected data back to the...
|
by: David C. Barber |
last post by:
upsized an MDB to ADP/SQL Server 2000 under Access 2000. All the DAO code
that I've changed to ADO code is working fine, HOWEVER the form Record
Source itself does not seem willing to return data....
|
by: baret bonden |
last post by:
Trying to return a selected listbox item to another form .tried lots of
ways; defining public variables and passing those as well as textboxes ..I'
m able to display the chosen item on it's form...
|
by: lorirobn |
last post by:
Hi,
I have a continuous form which displays all the records on a table.
The detail row has a command button which, if pressed, takes the user
to another form where that record can be edited.
...
|
by: Raj |
last post by:
I need a VB function to return array of collections like
Private Type Employee
empname as string
address as string
salary as integer
deptno as integer
End Type
dim employees() as Employee
|
by: pfildes |
last post by:
Hi,
I am pretty new to VB.net and am having trouble figuring out how to do this.
I have an app that copies data from one datasource to another.
I have it set to run through a for loop for...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |