|
-
Jul 29th, 2004, 09:32 AM
#1
Thread Starter
Fanatic Member
declaring an OpenFileDialog object in a class for global use *RESOLVED*
I am trying to declare an instance of the OpenFileDialog object in a class, which is in a class library with the line
VB Code:
Public o As New OpenFileDialog
This line works fine in the form.vb file but then in the class.vb file the OpenFileDialog is underlined with a blue wiggle.
How do you declare an OpenFileDialog object in a class for global use?
Last edited by davidrobin; Jul 29th, 2004 at 10:17 AM.
-
Jul 29th, 2004, 10:17 AM
#2
Thread Starter
Fanatic Member
Found the problem.
I hadn't added a reference to the system.windows.forms.dll.
Now it works.
-
Jul 29th, 2004, 10:51 AM
#3
Fanatic Member
Re: declaring an OpenFileDialog object in a class for global use *RESOLVED*
Originally posted by davidrobin
I am trying to declare an instance of the OpenFileDialog object in a class, which is in a class library with the line
VB Code:
Public o As New OpenFileDialog
This line works fine in the form.vb file but then in the class.vb file the OpenFileDialog is underlined with a blue wiggle.
How do you declare an OpenFileDialog object in a class for global use?
how did you realise this? you mentioned a blue wiggle, that means there's an error in the code.
I always have the Task List visible so that I can see what the errors are, and what I have to do.
View > Other Windows > Task List (Ctrl+Alt+K)
-
Jul 29th, 2004, 11:02 AM
#4
Thread Starter
Fanatic Member
I think the blue wiggle was indicating an undeclared custom something.
The class didn't know what OpenFileDialog was.
-
Jul 29th, 2004, 11:04 AM
#5
Fanatic Member
yeah, just giving a tip for that task list. i really like it myself, and i don't think its even default to appear when you first install vb.net
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
|