Click here to Skip to main content
15,929,429 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Shared Class Members Pin
Luke R4-Oct-06 12:57
Luke R4-Oct-06 12:57 
GeneralRe: Shared Class Members Pin
Christian Graus4-Oct-06 13:04
protectorChristian Graus4-Oct-06 13:04 
GeneralRe: Shared Class Members Pin
Luke R4-Oct-06 13:07
Luke R4-Oct-06 13:07 
GeneralRe: Shared Class Members Pin
Guffa4-Oct-06 12:25
Guffa4-Oct-06 12:25 
QuestionError - NonComVisible Base Class Pin
eatwork4-Oct-06 9:59
eatwork4-Oct-06 9:59 
QuestionUsing ADODC in VB6 Pin
Tomic4-Oct-06 7:02
Tomic4-Oct-06 7:02 
AnswerRe: Using ADODC in VB6 Pin
Guffa4-Oct-06 12:13
Guffa4-Oct-06 12:13 
Question[VB.NET] Need help with serial port communication Pin
belowzero4-Oct-06 5:05
belowzero4-Oct-06 5:05 
AnswerRe: [VB.NET] Need help with serial port communication Pin
Dave Kreskowiak4-Oct-06 6:27
mveDave Kreskowiak4-Oct-06 6:27 
GeneralRe: [VB.NET] Need help with serial port communication Pin
belowzero4-Oct-06 8:23
belowzero4-Oct-06 8:23 
GeneralRe: [VB.NET] Need help with serial port communication Pin
Dave Kreskowiak4-Oct-06 9:31
mveDave Kreskowiak4-Oct-06 9:31 
GeneralRe: [VB.NET] Need help with serial port communication Pin
belowzero4-Oct-06 19:39
belowzero4-Oct-06 19:39 
GeneralRe: [VB.NET] Need help with serial port communication Pin
belowzero5-Oct-06 6:43
belowzero5-Oct-06 6:43 
QuestionTableLayoutPanel Question Pin
Like2Byte4-Oct-06 5:05
Like2Byte4-Oct-06 5:05 
AnswerRe: TableLayoutPanel Question Pin
Dave Kreskowiak4-Oct-06 5:37
mveDave Kreskowiak4-Oct-06 5:37 
GeneralRe: TableLayoutPanel Question Pin
Like2Byte4-Oct-06 5:41
Like2Byte4-Oct-06 5:41 
Question.NET Delegate [modified] Pin
nlindley74-Oct-06 4:32
nlindley74-Oct-06 4:32 
AnswerRe: .NET Delegate Pin
Dave Kreskowiak4-Oct-06 5:20
mveDave Kreskowiak4-Oct-06 5:20 
GeneralRe: .NET Delegate Pin
nlindley74-Oct-06 6:28
nlindley74-Oct-06 6:28 
Thanks for the response Dave Big Grin | :-D

Dave Kreskowiak wrote:
an event or callback delegate that your form subscribes to


I've been trying to work with the delegate again all morning, and i'm just missing the connection (in my brain) somewhere. Heres what I have...

Form1(Modify2.vb)

Create the delegate:
Public Delegate Sub ClearDel(ByVal clear As Boolean)

Create the event:
Private evtClear As ClearDel

Public Sub Register(ByVal objClear As ClearDel)
'raise event here?
End Sub

Public Sub fireClear()
'clearing code
End Sub

Form2(frmPayableInfo)

Private WithEvents mobjModify2 As Modify2

In the sub where I process, at the end i have this:
mobjModify2 = New Modify2
mobjModify2.Register(New Modify2.ClearDel(AddressOf eventClear)

and then i have the sub:
Public Sub eventClear(ByVal clear As Boolean)
clear = True
End Sub


So now the question is, how do I hook up the fireClear() event on Form1(modify2.vb) with the delegate. And where would I set the condition for the delegate to fire? Thanks again for the response.


Nathan Lindley
.NET Aficionado
GeneralRe: .NET Delegate Pin
Dave Kreskowiak4-Oct-06 6:47
mveDave Kreskowiak4-Oct-06 6:47 
GeneralRe: .NET Delegate Pin
nlindley74-Oct-06 7:19
nlindley74-Oct-06 7:19 
GeneralRe: .NET Delegate Pin
Dave Kreskowiak4-Oct-06 7:32
mveDave Kreskowiak4-Oct-06 7:32 
GeneralRe: .NET Delegate Pin
nlindley74-Oct-06 8:07
nlindley74-Oct-06 8:07 
GeneralRe: .NET Delegate Pin
Dave Kreskowiak4-Oct-06 9:26
mveDave Kreskowiak4-Oct-06 9:26 
QuestionWebBrowser proxy server Pin
winmedia4-Oct-06 4:08
winmedia4-Oct-06 4:08 

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.