problem in unload a usercontrol
I don't know what mistake I have made, I have an error occurs in my
program when I tried to execute Unload myUserControl statement.
I create a usercontrol, and place it in a form with
index=0 and name=myUserControl
During run time, I create a control array of this usercontrol type,
and later in one of the subroutines I execute the statement unload
myUserControl(Index) where Index>0.
Suddenly the screen pops up a messagebox as below:
This program has performed an illegal operation and will be shut
down. If the problem persists, contact the program vendor.
Clicking on the Detail button on this messagebox, it shows:
Cause an invalid page fault in module <unknown> at 0141:a0000001....
I have to shut down the running program and the VB workspace.
Later I tried to step through it and found that after the execution
of the End Sub of the subroutine that contains the unload statement,
that messagebox appears. No way I can find the problem of my code
as I have to shut VB down.
Any one with this experience?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center