Updating a TextBox in a Non Modal Windows Form Dialog

D

Dennis C. Drumm

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
 
J

John Baro

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
 
W

William Stacey

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top