Can not add a custom .NET control on the form in design-time 
Author Message
 Can not add a custom .NET control on the form in design-time

Hi,

Does anyone know why I am getting error :
"Exception from HRESULT: 0x80131019"
when I am trying to put the simplest .NET control created using Managed C++
Extensions on the form in design-time.

Note: I can manually add this control to the form of other application using
code editor and it will work fine in run-time.

Maybe I missed some special settings for the project or some class/assembly
attributes?
I would greatly appreciate any ideas or suggestions.

Thanks,
Andrew

----------------------------------------------------------------------------
------------------------------------------------
#pragma once

#using <System.dll>
#using <System.Windows.Forms.DLL>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Windows::Forms;
using namespace System::Drawing;

namespace MCL2
{
  public __gc class Class2 : public System::Windows::Forms::Control
  {
     protected:
        virtual void                OnPaint(PaintEventArgs* e)
        {
           e->Graphics->DrawRectangle(System::Drawing::Pens::BlanchedAlmond,

this->ClientRectangle);
        }
  };

Quote:
}

----------------------------------------------------------------------------
------------------------------------------------


Wed, 07 Jul 2004 06:56:01 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. HOWTO : Design-time custom collection editing for custom control

2. Custom control fire NullReferenceException at design time

3. Custom control properties and VB design time

4. Custom control with no border at design time.

5. Exception happens in case of putting NET control on the from in design-time

6. Unable to add custom C# control to a form - Exception from HRESULT: 0x80131019

7. C# ASP.NET Forms - Client Side Validation using Custom Validator Control

8. How to write design-time control with C# in vs.net

9. Custom Design Time Wizards

10. Design time form at runtime

11. Form Collection in Design Time

12. Does VC.Net Support a Forms-Based GUI Design like VB and C#

 

 
Powered by phpBB® Forum Software