|
-
May 5th, 2003, 06:29 PM
#1
Thread Starter
Member
Messagebox and Custom Class Library
Hi,
I am writing a custom control to accept date values only.
I wish to display an error message if an incorrect date is entered, however when I use the Messagebox.Show() command the dll will not compile.
The error message is "Name 'Messagebox' is not declared."
Either this is not possible, or I have to import a system reference of some kind into my project.
Can someone assist?
-
May 5th, 2003, 07:01 PM
#2
PowerPoster
You have to set a reference to the System.Windows.Forms assembly.
-
May 5th, 2003, 07:05 PM
#3
Thread Starter
Member
Hi,
I had already done what you suggested when I started the project.
Project ->Add Reference -> .Net Tab
System.Windows.Forms.dll
Is his correct/what you mean?
-
May 5th, 2003, 07:18 PM
#4
PowerPoster
Yes, you may also want to import the namespace to alleviate having to use the fully qualified name when referencing types in the namespace.
-
May 5th, 2003, 07:42 PM
#5
Thread Starter
Member
ahh, thats better!.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|