Click to See Complete Forum and Search --> : Minimize the control
Harini
April 5th, 2001, 08:53 AM
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.
Please help me with a way to minimize the control when the ShowDesktop icon is clicked.
Thanks
Harini
Cimperiali
April 5th, 2001, 09:25 AM
Have you 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
Hope this help
(strange ocx you've made...!:-))
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
Harini
April 5th, 2001, 10:05 AM
Yes the 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 methodof minimizing OCX is not getting called as the Form Resize itself is not getting called
Thanks
Harini
Cimperiali
April 6th, 2001, 07:15 AM
Sorry i mismatched the point. I am afraid I cannot help more than give you a little hint:
As your parent form (the form where your ocx is) do minimize, you could have a timer (or timer function) in your ocx to test every half a second for parent's windowstate, and if you find it is minimized, you can call for your method inside the ocx itself. Do not forget to stop the timer on closing ocx.
Hope this help,
Cesare Imperiali
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.