By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,389 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

Updating a TextBox in a Non Modal Windows Form Dialog

P: n/a
I have a window form dialog that I use in a non modal fashion. It is
displayed using Show() in stead of ShowDialog() from the parent windows form
application. I have TextBoxes in that dialog that needs to be updated when
certain changes are made in the parent windows form application. I've tried
setting up a method in the dialog that can be called by the parent that
changes/updates the text box and I've tested it to make sure the statement
to change the text box is called and it is. But for some reason, probably
associated with the fact that the dialog doesn't have the focus when the
call is made, nothing happens. Can someone suggest what I may try to correct
this situation?

Thanks,

Dennis
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Dennis

You could create an event on the main form that fires and passes the new
info and then subscribe to that event in the other form.

HTH
JB

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
I have a window form dialog that I use in a non modal fashion. It is
displayed using Show() in stead of ShowDialog() from the parent windows form application. I have TextBoxes in that dialog that needs to be updated when
certain changes are made in the parent windows form application. I've tried setting up a method in the dialog that can be called by the parent that
changes/updates the text box and I've tested it to make sure the statement
to change the text box is called and it is. But for some reason, probably
associated with the fact that the dialog doesn't have the focus when the
call is made, nothing happens. Can someone suggest what I may try to correct this situation?

Thanks,

Dennis

Nov 13 '05 #2

P: n/a
Did you try form.refresh() from the main form after you set the text boxes
or withing the method on the child form? I did have done what your trying
to do, so I know it can work. Maybe something else going on here. Can you
create a small two form app the deminstrates this issue?

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
I have a window form dialog that I use in a non modal fashion. It is
displayed using Show() in stead of ShowDialog() from the parent windows form application. I have TextBoxes in that dialog that needs to be updated when
certain changes are made in the parent windows form application. I've tried setting up a method in the dialog that can be called by the parent that
changes/updates the text box and I've tested it to make sure the statement
to change the text box is called and it is. But for some reason, probably
associated with the fact that the dialog doesn't have the focus when the
call is made, nothing happens. Can someone suggest what I may try to correct this situation?

Thanks,

Dennis

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.