Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is my code...

VB
Imports System.Windows.Forms.Design
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing.Design
Imports System.Drawing.Drawing2D

Public Class WhatEver
    Inherits ControlDesigner


End Class


The line (Inherits ControlDesigner) is throwing an error...Error Says
"Type ControlDesigner is not defined"

I get the same error in VS 2005, VS 2008 and VS 2010.

I checked the Object Browser and it shows up under
VB
System.Windows.Forms.Design


What am I doing wrong???
This is a class file.
Posted
Comments
AspDotNetDev 19-Sep-11 12:59pm    
Did you ever figure out the solution?
rspercy65 19-Sep-11 16:43pm    
Yes I Did, I had to UnInstall All Visual Studios' And Re-InStall them
all over again , download and install all the updates untill current
again. Im still working on the XP updates for VS2005.
AspDotNetDev 19-Sep-11 17:06pm    
Ouch.

1 solution

You need to add a reference to System.Design.dll. If it does not show in the Add Reference dialog, your project may be set to the .Net 4 Client Profile. To use DLL's from the full framework, go to your project Properties, Compile tab, Advanced Compile Options button, and for "Target framework (all configurations)", change ".NET Framework 4 Client Profile" to ".NET Framework 4".
 
Share this answer
 
Comments
rspercy65 15-Sep-11 19:20pm    
Have done all that before I posted.
AspDotNetDev 15-Sep-11 19:41pm    
Are you sure you added a reference to System.Design? Note that it is not in the same DLL as System.Windows.Forms. And also note that by "add reference", I do not mean "add an import statement" (as I noticed you already did that in your sample code above). When you type in "System.Windows.Forms.Design.", does "ControlDesigner" show up in Intellisense? What version of Visual Studio are you using?
rspercy65 15-Sep-11 20:00pm    
I have all 3 versions of VS and it does the same thing in all of them. The ControlDesigner does not show in the Intellisense nor does it show in the add reference. I have the Advanced Options set to ".Net 4 Framework for VS10, .Net 3.5 For VS 9.0 and .Net 2.0 Framework for VS 8.0." These are all on different computers, VS8.0/XP, VS9.0/Vista, VS10.0/Win7. They are all up to date. All service packs installed for everything.
I am trying to create a button control similar to SSDiver2112's CButton except I want to create the buttons on a T83 Calculator with the same ARC style.
AspDotNetDev 15-Sep-11 21:50pm    
You said: "The ControlDesigner does not show in the Intellisense nor does it show in the add reference". What do you mean ControlDesigner doesn't show in the Add Reference dialog? It shouldn't show there. You should add System.Design in the Add Reference dialog, and THEN you should see System.Windows.Forms.Design.ControlDesigner in Intellisense.
Member 12741660 9-Nov-16 12:35pm    
Where is this this System.Design.dll located?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900