Click here to Skip to main content
15,891,704 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET INTERESTING PROBLEM-- MOVING AVERAGE ,, NEED HELP !!!! Pin
adarshyam6-Oct-08 7:22
adarshyam6-Oct-08 7:22 
QuestionHow to disable / hide Start Orb in Windows Vista using Visual Basic 6 (not VB.Net, VB2005 or VB2008 or C# or C++ !!!) Pin
Vladimir Nazarov3-Oct-08 15:18
Vladimir Nazarov3-Oct-08 15:18 
AnswerRe: How to disable / hide Start Orb in Windows Vista using Visual Basic 6 (not VB.Net, VB2005 or VB2008 or C# or C++ !!!) Pin
jzonthemtn3-Oct-08 15:43
jzonthemtn3-Oct-08 15:43 
QuestionFunction Delegate Pin
nlarson113-Oct-08 11:21
nlarson113-Oct-08 11:21 
AnswerRe: Function Delegate Pin
Dave Kreskowiak3-Oct-08 12:26
mveDave Kreskowiak3-Oct-08 12:26 
GeneralRe: Function Delegate Pin
nlarson113-Oct-08 13:46
nlarson113-Oct-08 13:46 
GeneralRe: Function Delegate Pin
Guffa4-Oct-08 1:06
Guffa4-Oct-08 1:06 
AnswerRe: Function Delegate Pin
John_Adams3-Oct-08 12:27
John_Adams3-Oct-08 12:27 
Hi Nathan,

Following is a demo of Funtion Delegates in VB.Net

BEGIN CODE

Imports System

Public Class MainClass
Dim emp As New Employee("First Name", "Last Name")

Private Delegate Function NumEmployeesDelegate() As Integer

Shared Sub Main(ByVal args As String())
Dim show_num As NumEmployeesDelegate
show_num = AddressOf Employee.GetNumEmployees

Console.WriteLine(show_num().ToString)

End Sub

End Class

Public Class Employee

Private m_FirstName As String
Private m_LastName As String

Private Shared m_NumEmployees As Integer = 0

Public Shared Function GetNumEmployees() As Integer
Return m_NumEmployees
End Function

Public Sub New(ByVal first_name As String, ByVal last_name As String)
m_FirstName = first_name
m_LastName = last_name
m_NumEmployees += 1
End Sub

Public Overrides Function ToString() As String
Return m_FirstName & " " & m_LastName
End Function

Private disposedValue As Boolean = False ' To detect redundant calls

End Class

END CODE

Hope thhis helps Smile | :)

Regards,
John Adams
ComponentOne LLC

GeneralRe: Function Delegate Pin
nlarson113-Oct-08 13:51
nlarson113-Oct-08 13:51 
AnswerRe: Function Delegate Pin
Gideon Engelberth3-Oct-08 15:55
Gideon Engelberth3-Oct-08 15:55 
QuestionCustom control Pin
Tom Deketelaere3-Oct-08 9:17
professionalTom Deketelaere3-Oct-08 9:17 
AnswerRe: Custom control Pin
nlarson113-Oct-08 10:27
nlarson113-Oct-08 10:27 
GeneralRe: Custom control Pin
Tom Deketelaere3-Oct-08 11:29
professionalTom Deketelaere3-Oct-08 11:29 
GeneralRe: Custom control Pin
Dave Kreskowiak3-Oct-08 12:19
mveDave Kreskowiak3-Oct-08 12:19 
GeneralRe: Custom control Pin
Tom Deketelaere4-Oct-08 0:50
professionalTom Deketelaere4-Oct-08 0:50 
QuestionVB COM object works fine when called from server, but not workstation... Pin
rahvyn133-Oct-08 6:39
rahvyn133-Oct-08 6:39 
AnswerRe: VB COM object works fine when called from server, but not workstation... Pin
nlarson113-Oct-08 10:18
nlarson113-Oct-08 10:18 
GeneralRe: VB COM object works fine when called from server, but not workstation... Pin
rahvyn134-Oct-08 2:21
rahvyn134-Oct-08 2:21 
QuestionHow to call functions from normal DLL's in VB.NET Pin
mastergamer01683-Oct-08 6:32
mastergamer01683-Oct-08 6:32 
AnswerRe: How to call functions from normal DLL's in VB.NET Pin
jzonthemtn3-Oct-08 6:37
jzonthemtn3-Oct-08 6:37 
QuestionConcatenating to perform an action [modified] Pin
MatthewABlack3-Oct-08 4:03
MatthewABlack3-Oct-08 4:03 
AnswerRe: Concatenating to perform an action [modified] Pin
MatthewABlack3-Oct-08 4:07
MatthewABlack3-Oct-08 4:07 
AnswerRe: Concatenating to perform an action Pin
nlarson113-Oct-08 10:11
nlarson113-Oct-08 10:11 
AnswerRe: Concatenating to perform an action Pin
Gideon Engelberth3-Oct-08 15:59
Gideon Engelberth3-Oct-08 15:59 
QuestionDesign Tips Needed Pin
nlarson113-Oct-08 3:52
nlarson113-Oct-08 3:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.