mousewheel problem on mdichild after setting focus on base form controlls and comming back to the mdichild
-
11-10-2019 - |
Question
Hi Today I encountered a new problem with MouseWheel I have written some codes in mousewheel event of my mdichild forms , when I open new mdichild form and select it and do mousewheel , it detects the event but when I click on a control on my base form and comeback to mdichild and use mouse wheel, mousewheel event is not triggered anymore unless I set focus on another MDIChildform and come back to the childform again . Please help me solve the problem Thanks
here is a sample of this problem which is a little modification on default MDIAPP template http://egmahdi.com/mdiApptemplate.rar
Solution 2
Hi There is also another really simple answer to this problem , I noticed that when there is a control on mdichildform and I click on this control , everything is ok , so I placed a TButton on mdichildform and added button1.setfocus on form.mousedown event and everything is okay now , I also moved the button to -200 , -200 , so the button is never shown , Actually I do not have any other control on my form and I just paint on the form ,
OTHER TIPS
Hi I used the way Andreas Hausladen has written here and my problem is completely solved .
thanks to Mr Sertac Akyuz and Andreas Hausladen .