I thought overriding CreateParams as in Delphi might be enough. Thank you for your answer and clarifying my doubts.