>Thanks a lot for your answer I tried it and is ok.
>
>Is it a way to put the DATASESSION=2 in Custom (.vcx) in order not to have it in a .prg ?
>
The SESSION can only be implemented in code.
>if not, can I use screen as a class ?
>
You'd have to use FORM as the base class, and there are issues related to UI with the use of forms if you are not careful. Since this is going to be a COM component, being in a VCX is a complete non-issue; you'll be distributing a component (.DLL or .EXE) and not a class library, and if it's intended for use in-proc, it can't have any UI elements.