c# - How to focus a visual .NET-Component in Delphi ObjectInspector -


i'm including visual .net-component delphi project. using component @ runtime works fine while delphi designer not cooperate properly. every click on component in designer sends message component (the impact can seen).
want see published properties of component in ide designer's object inspector resize , drag , drop component on form.

i considered inherit twincontrol.wndproc method , catch wm_mouseactivate , wm_parentnotify messages (those messages sent when clicking component in designer) , this...

procedure tmycomponent.wndproc(var message: tmessage);   case message.msg of     wm_parentnotify, wm_mouseactivate:     begin       self.setfocus;       self.borderwidth := 15;     end;   else     inherited;   end; end; 

clicking component in designer setting borderwidth 15 now. still not focused in ide's object inspector.

additional information project:

i using delphi xe7 , visual studio 2013... in .net i'm using classlibrary project component. inherit class usercontrol contains visual c# component. classlibrary compiled dll file register via "regasm /tlb /codebase classlibrary.dll". use furthermore tlibimp.exe generate pas-file delphi. have written wrapperclass tdotnetcontrol derived tolecontrol , overrides/implements procedure wndproc.

from class tdotnetcontrol derive class tmydotnetcontrol overrides initcontroldata , createinstance (from tolecontrol). tmydotnetcontrol packed package build , install within delphi ide. after installation can choose class tmydotnetcontrol toolbox of designer , can drag , drop winform. because compiled class dll file, component displayed in designer displayed @ runtime (in case don't call procedures or set properties).

and when things confusing. can drag , resize once. clicking compiled component again triggers mouseevent on component itself. means, if mouseevent handler implemented in .net, handler method called , performed (even in designer). want therefore catching ide's click message , make method focussing component edit in object inspector @ design time. (the object inspector shows published properties of tmydotnetcontrol)


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -