Hi All,
In continuation of my previous thread https://community.dynamics.com/ax/f/33/t/183420 I want to ask few more questions based on suggested answers on my previous thread and after my learning.
I created a visual studio project of Class Library type and added a WPF textbox control into it. Changed properties of the control so it can show scroll bar and wrap text as shown;

I build this project and copied DLL into C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Share\Include folder. I also copied this DLL into C:\Windows\System32 folder and the register this DLL using following command and it registered successfully.

I made following changes to AX to use this control on AX form and to deploy this DLL automatically on each client rather registering it using command.
Added a new Class with name test_sysFileDeployment extends SysFileDeploymentDLL
class test_sysFileDeployment extends SysFileDeploymentDLL
{
#Define.regasmCommand(@'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe')
}
public Filename filename()
{
return 'SpellCheckerCtrl.dll';
}
protected void register(boolean atReboot)
{
int handle;
#winapi
;
WinAPI::setCurrentDirectory(this.destinationPath());
//TODO Check regasm executable exists on client
WinAPI::shellExecute(#regasmCommand, strfmt('"%1" %2', this.destinationPath()+this.filename(),'/codebase'));
}
protected void unRegister()
{
int handle;
#winapi
;
WinAPI::setCurrentDirectory(this.destinationPath());
//TODO Check regasm executable exists on client
WinAPI::shellExecute(#regasmCommand, this.destinationPath()+this.filename()+' /unregister');
}
Also updated the filesToDeploy method in SysFileDeployer Class as;
private static container filesToDeploy()
{;
return [classnum(test_SysFileDeploymentDLL)];
/*
return [classNum(class1), classNum(class2), ... ]
*/
}
I have also clear usage data and there is not value on usage data form now.
I added new Form and than added new ActiveX control and dont see my control to reference which I deployed through DLL.
Is there anything I am missing or Am I going it wrong ?