Why ColorDialog can not be used?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi ALL,

I have created a App to select color.
but when I want to create ColorDialog instance,
It says: The type or namespace name'ColorDialog' could not be found
(are you missing a using directive or an assembly reference)

I have checked the DLL reference directory.It is correct.

what is the problem?

Please help me! I am a newpie to dotnet 2005
 
jeff said:
I have created a App to select color.
but when I want to create ColorDialog instance,
It says: The type or namespace name'ColorDialog' could not be found
(are you missing a using directive or an assembly reference)

I have checked the DLL reference directory.It is correct.

what is the problem?

Well, you've said that you've checked that you've got the reference
correct. Have you got the namespace in your code as well, as the error
message suggested that you checked?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

Here's a short but complete program which *does* work:

using System.Windows.Forms;

class Test
{
static void Main(string[] args)
{
ColorDialog dialog = new ColorDialog();
dialog.ShowDialog();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top