I have put an OCX which is created by us on to a form.

When I minimize the form, the OCX is still being displayed. To solve this problem we created a method in the OCX, which minimize the control also when called.

But now when clicked on the ShowDesktop icon from the taskbar, the form is getting minimized but not the control.

We have tried to call the method to minimize ocx also in resize event of form wher ocx is?
Ie:
private sub form_resize
if me.windowstate= vbminimized then
'call your method to minimize ocx
end if
end sub

The above method is called when we minimize the form from VB. Now the problem is when we click on Show Desk top icon which is present at the bottom left corner of screen, all the applications including VB gets minimized. However at this time the method of minimizing OCX is not getting called as the Form Resize itself is not getting called.


Please help me with a way to minimize the control when the ShowDesktop icon is clicked.


Thanks
Harini