Not usually, though the articles of association may say you have to sell your shares in certain instances - for example, if you leave the company. You should therefore check the company's articles before buying any shares.
Insider dealing - where you make share profits using information which you are aware of because of your position as a director, but which is not publicly available - is illegal.