Hi Roman,
>
>How to create a visual class object based on session type like custom ?
The Session Class can only be used programmatically, however there are three visual classes that can have a private datasession - Formset, Form and Toolbar. Of the three the Formset is the 'lightest - but only if you use it programmatically and set its FormCount = 0.
Otherwise use a Toolbar and set it's Visible property to .F. and put a NODEFAULT in it's Show() method - that will prevent it from ever being made visible. Then just give it a Private Datasession and you have the nearest thing to a visual equivalent of the Session class.
----
Regards
Andy Kramek