Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))

I was developing some custom control and started getting this problem suddenly. While trying to figure it out, I realized that it was [TooboxItemAttribute] that was causing problem.
 
In my case, I was developing one base WebControl and one child webcontrol derived from base. I didn’t wanted to display the base webcontrol in the toolbox, so I set the [TooboxItem(false)] in the base webcontrol. In child webcontrol it was set to [ToolboxItem(true)]. After setting this ToolboxItemAttribute class, I started facing the problem and I was not able to drag-n-drop the control over the designer.
 
After I removed the [TooBoxItemAttribute] from both the webcontrol classes, the problem was gone and I was again able to drag-n-drop the controls.
 
It’s really pethatic that there is no help available for this error and error message doesn’t reveal any information to crack this problem.
Advertisements
This entry was posted in .net (control development). Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s