You are creating an object of Type Form Form *Form1 = new Form(); but giving it just a name as Form1 but your class name is Form1 public __gc class Form1 : public System::Windows::Forms::Form and so SetParameter is a member of Form1 class and not Form class and thats why the error.