Click here to Skip to main content
15,907,328 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: create properites and assign to object at rum time Pin
Ashfield29-Oct-08 22:07
Ashfield29-Oct-08 22:07 
QuestionRe: create properites and assign to object at rum time Pin
Eddy Vluggen29-Oct-08 22:32
professionalEddy Vluggen29-Oct-08 22:32 
AnswerRe: create properites and assign to object at rum time Pin
Dave Kreskowiak30-Oct-08 2:10
mveDave Kreskowiak30-Oct-08 2:10 
QuestionGrouping Enums Pin
Jarno Burger29-Oct-08 14:17
Jarno Burger29-Oct-08 14:17 
AnswerRe: Grouping Enums [modified] Pin
Luc Pattyn29-Oct-08 15:24
sitebuilderLuc Pattyn29-Oct-08 15:24 
AnswerRe: Grouping Enums Pin
Guffa29-Oct-08 23:43
Guffa29-Oct-08 23:43 
QuestionCapturing event... Pin
Subjugate29-Oct-08 14:08
Subjugate29-Oct-08 14:08 
AnswerRe: Capturing event... Pin
LeandroABorges30-Oct-08 0:48
LeandroABorges30-Oct-08 0:48 
Hi there

I don´t know exactly if you want this, but you can capture the event of the class with 2 ways:

First:

The declaration of the class is not in a function, it´s a global var. You can declare it like that:

Private WithEvents Client as ClientClass

And then you can set the handler of the event in a function, like that:

Private sub OnClientLogin (sender as object, e as eventArgs) handles Client.Login

Or you can set hte handler in the code:

Private sub SetClientEvents()

.....

addHandler Client.Login, addressof OnClientLogin

.....

end sub

Second:

If you have a class declared in the method, you can use addhandler

Private sub AddClient()

...

dim Client as ClientClass

...

addhandler Client.Login, addressof OnClientLogin

...

end sub

--------------

I think that is it what you want.

-----
LeandroAB

Questionneed help in mshflexgrid coding Pin
projit basu29-Oct-08 10:35
projit basu29-Oct-08 10:35 
AnswerRe: need help in mshflexgrid coding Pin
leckey29-Oct-08 13:36
leckey29-Oct-08 13:36 
AnswerRe: need help in mshflexgrid coding Pin
Christian Graus29-Oct-08 22:46
protectorChristian Graus29-Oct-08 22:46 
AnswerRe: need help in mshflexgrid coding Pin
Jon_Boy30-Oct-08 2:46
Jon_Boy30-Oct-08 2:46 
QuestionPadding with NULL char Pin
akuma609929-Oct-08 6:28
akuma609929-Oct-08 6:28 
AnswerRe: Padding with NULL char Pin
Chinners29-Oct-08 6:52
Chinners29-Oct-08 6:52 
AnswerRe: Padding with NULL char Pin
Dave Kreskowiak29-Oct-08 7:22
mveDave Kreskowiak29-Oct-08 7:22 
QuestionAutomation Error in VB6.0 Pin
Pedram Behroozi29-Oct-08 5:01
Pedram Behroozi29-Oct-08 5:01 
AnswerRe: Automation Error in VB6.0 Pin
Paul Conrad29-Oct-08 5:35
professionalPaul Conrad29-Oct-08 5:35 
GeneralRe: Automation Error in VB6.0 Pin
Pedram Behroozi29-Oct-08 5:45
Pedram Behroozi29-Oct-08 5:45 
GeneralRe: Automation Error in VB6.0 Pin
Paul Conrad29-Oct-08 5:55
professionalPaul Conrad29-Oct-08 5:55 
GeneralRe: Automation Error in VB6.0 Pin
Pedram Behroozi29-Oct-08 5:57
Pedram Behroozi29-Oct-08 5:57 
AnswerRe: Automation Error in VB6.0 Pin
Jon_Boy29-Oct-08 5:49
Jon_Boy29-Oct-08 5:49 
GeneralRe: Automation Error in VB6.0 Pin
Pedram Behroozi29-Oct-08 5:52
Pedram Behroozi29-Oct-08 5:52 
GeneralRe: Automation Error in VB6.0 Pin
Paul Conrad29-Oct-08 5:53
professionalPaul Conrad29-Oct-08 5:53 
AnswerRe: Automation Error in VB6.0 Pin
Pedram Behroozi29-Oct-08 6:26
Pedram Behroozi29-Oct-08 6:26 
GeneralRe: Automation Error in VB6.0 Pin
Jon_Boy29-Oct-08 7:25
Jon_Boy29-Oct-08 7:25 

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.