Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Need help using CreateParams()

Back to Forum: Tech Off
  • User profile image


       I'm trying use the override, CreateParams(), to drop a shadow on my form... but my form is created through a class during run time. I can't figure out how to get the CreateParams() function to affect the form being created... any ideas? Heres the error it makes.

    Error 1 'CustomToolTip.ToolTipForm.CreateParams': no suitable method found to override ...\Main.cs 169 41 CustomToolTip

  • User profile image

    Form.CreateParams is a property, not a method.

  • User profile image

    protected override CreateParams CreateParams {
    get {
       CreateParams parameters = base.CreateParams;
       parameters.ClassStyle = (parameters.ClassStyle | CS_DROPSHADOW);
       return parameters;

    What about if thats my code? How would I set that to the created form?

  • User profile image

    That should work if you add it to the ToolTipForm class.

    Edit: if you do not have the source to the ToolTipForm class your going to have to create a class that inherits from it and provides the functionality of the code above.  

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.