vb.net mdi parent - child forms problem

G

Guest

Hello,

My application loads with a form which is the mdi parent and a menu item click (main menu of the parent form) brings up a child form.
I have to wait for a considerable amout of time to execute an oracle procedure which has to be invoked from the above said child form.
The problem now is, during this waiting time, my mdi parent's menu is appearing to be not responding (becoming white in simple words). Once the oracle procedure is done (that process is over), the menu is active and ready again. Why and how to solve this.
Any help would be appreciated.

Thanks in advance !!
 
J

Jonathan Holmes

Code run from MDI child forms still executes in the context of the MDI
parent form (there is generally one user interface thread in the application
and no other threads should alter the user interface without synchronizing
with this thread) which is why the parent also hangs when the child is busy.

You need to create a new thread from within your MDI child form and call
your Oracle procedure from that, or otherwise invoke the Oracle procedure
asynchronously if your database connection mechanism allows this to be done
directly; please post back here if you need further help with setting up a
thread to call the method.


Jonathan Holmes

jinu said:
Hello,

My application loads with a form which is the mdi parent and a menu item
click (main menu of the parent form) brings up a child form.
I have to wait for a considerable amout of time to execute an oracle
procedure which has to be invoked from the above said child form.
The problem now is, during this waiting time, my mdi parent's menu is
appearing to be not responding (becoming white in simple words). Once the
oracle procedure is done (that process is over), the menu is active and
ready again. Why and how to solve this.
 

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