xsharp.eu • Miscellaneous questions about converting VO code to X# - Page 7
Page 7 of 7

Re: Miscellaneous questions about converting VO code to X#

Posted: Fri Sep 13, 2024 6:50 am
by Kees Bouw
Hi Chris,

Thank you very much for your reply. Using NEW is indeed the answer, now that you mentioned this I looked at the "Class hierarchy modifiers" page in the online documentation again and it is explained there. I did see this page yesterday but I did not read it carefully because there was so much text and I missed the NEW keyword. Instead I tried OVERRIDE which did not work. Sorry about that but thank you for helping me out.
I have already created an alternative for the windows hierarchy problems. I separated the two underlying classes from the winform and use them by passing the winform object to them. So now the winform itself inherits from the Form class directly again and this works. It is quite a large application with a complicated structure and I have added and imported a lot of code, I feel that it may be difficult to isolate the problem. Also there is a fair chance that if I do that in a new test app then the problem can't be reproduced. This has happened before. I don't think it will be worth the time and effort at the moment.

Kees.

Re: Miscellaneous questions about converting VO code to X#

Posted: Fri Sep 13, 2024 8:29 am
by Chris
Hi Kees,

Yes, OVERRIDE is for overriding a parent method which is VIRTUAL. In this case, the method is not virtual (it was done on purpose this way, so you cannot override it), so you need to define a new method as NEW, if you want to use the same name.