-
Oct 27th, 2013, 04:53 AM
#1
Thread Starter
Junior Member
[RESOLVED] Rising Event in VB6
Hello I'm trying to apply the method described in this URL.
The problem is that the events are not implemented in a standard way.
How can you implement the events ?
I have attach a test project for testing!
TestEvents.zip
-
Oct 27th, 2013, 06:38 AM
#2
Re: Rising Event in VB6
Code:
Private Sub Form_Load()
Set Complete = New CPerson
Complete.Init "First", "Last"
End Sub
-
Oct 27th, 2013, 07:50 AM
#3
Thread Starter
Junior Member
Re: Rising Event in VB6
Originally Posted by Doogle
Code:
Private Sub Form_Load()
Set Complete = New CPerson
Complete.Init "First", "Last"
End Sub
That's true.
But what if I want to use:
Code:
Public Function New_CPerson(FirstName As String, LastName As String, Optional ID As Variant, Optional BirthDate As Variant) As CPerson
Set New_CPerson = New CPerson
New_CPerson.Init FirstName, LastName, ID, BirthDate
End Function
And in Form call
Code:
Call New_CPerson ("First", "Last")
Then how the Event will be Raised ?
-
Oct 27th, 2013, 08:48 AM
#4
Frenzied Member
Re: Rising Event in VB6
SEE The following way to raise event
Code:
public withEvents New_cperson 'this is the way to raise the event
Public Function New_CPerson(FirstName As String, LastName As String, Optional ID As Variant, Optional BirthDate As Variant) As CPerson
Set New_CPerson = New CPerson
New_CPerson.Init FirstName, LastName, ID, BirthDate
End Function
And to know more about raising event see the following link .hope it might help.
http://stackoverflow.com/questions/1...n-event-in-vb6
http://www.developer.com/net/vb/arti...al-Basic-6.htm
-
Nov 7th, 2013, 02:08 PM
#5
Thread Starter
Junior Member
Tags for this Thread
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
|