|
-
May 10th, 2007, 07:19 AM
#1
Thread Starter
Member
strange global problem
hello all,
i have a class in my project, and i am declaring a number of things from it using PUBLIC
however, non of these things seem to work outside of the class. I have changed the name of the class if that makes a difference. But whenever i use something declared from the class it says that it has not be declared yet, thus the evil blue line.
any suggestions? i have gone through some of my older projects and have written the exact same things, but still, nothing.
thanks
-
May 10th, 2007, 07:46 AM
#2
Re: strange global problem
vb Code:
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim t As New Test
t.DoSomething()
End Sub
End Class
Public Class Test
Public Sub DoSomething()
'Code here
End Sub
End Class
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
May 10th, 2007, 07:47 AM
#3
Re: strange global problem
If you want to use class members without having to declare a class object you can declare them as "Shared"
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
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
|