Click here to Skip to main content
15,916,442 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Connecting scanner Pin
H@is@here18-Feb-05 10:14
H@is@here18-Feb-05 10:14 
GeneralRe: Connecting scanner Pin
Avanti Dharkar19-Feb-05 3:52
Avanti Dharkar19-Feb-05 3:52 
QuestionCan some Help me with this over kill i know but ? Pin
Delo12-Feb-05 20:42
Delo12-Feb-05 20:42 
AnswerRe: Can some Help me with this over kill i know but ? Pin
Dave Kreskowiak13-Feb-05 17:27
mveDave Kreskowiak13-Feb-05 17:27 
QuestionHow to call a procedure Pin
Mekong River12-Feb-05 16:23
Mekong River12-Feb-05 16:23 
AnswerRe: How to call a procedure Pin
mm_chanakaya12-Feb-05 16:33
mm_chanakaya12-Feb-05 16:33 
GeneralRe: How to call a procedure Pin
Mekong River13-Feb-05 3:15
Mekong River13-Feb-05 3:15 
AnswerRe: How to call a procedure Pin
rwestgraham12-Feb-05 17:53
rwestgraham12-Feb-05 17:53 
First of all, your btn name and the Handles control name really should reference the same button in the second click handler you have shown above.

Second, if you need to run a common set of code from two or more control event handlers, you should move the code out of the control event handler and into a separate procedure. In the long run this will make your code much clearer and more maintainable. Calling control events from other control events is not a particularly good practice in terms of design.

I would rewrite the above code as:

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

Private Sub btnEvalGuide_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnEvalGuide.Click

' the code work here.
' ...
'Call common procedure here
DoMyCommonProc()
End Sub

Private Sub btnIntVuDmExp_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnIntVuDmExp.Click

' the code work here.
' ...
'Call common procedure here
DoMyCommonProc()
End Sub

Private Sub DoMyCommonProc()

'Put common code in this procedure and call from both click events

End Sub

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

Robert

GeneralRe: How to call a procedure Pin
Mekong River13-Feb-05 3:14
Mekong River13-Feb-05 3:14 
Generalcutting video file Pin
mm_chanakaya12-Feb-05 8:48
mm_chanakaya12-Feb-05 8:48 
GeneralRe: cutting video file Pin
Mike the Red13-Feb-05 16:16
Mike the Red13-Feb-05 16:16 
GeneralRe: cutting video file Pin
mm_chanakaya14-Feb-05 5:57
mm_chanakaya14-Feb-05 5:57 
GeneralHelp controlling columns in datagrid Pin
Gaz@UK12-Feb-05 8:20
Gaz@UK12-Feb-05 8:20 
GeneralRe: Help controlling columns in datagrid Pin
Dave Kreskowiak14-Feb-05 4:53
mveDave Kreskowiak14-Feb-05 4:53 
GeneralRe: Help controlling columns in datagrid Pin
Gaz@UK14-Feb-05 21:38
Gaz@UK14-Feb-05 21:38 
GeneralGet Top 10 from a search engine Pin
Mohsen Saad12-Feb-05 7:37
Mohsen Saad12-Feb-05 7:37 
GeneralRe: Get Top 10 from a search engine Pin
Dave Kreskowiak13-Feb-05 5:52
mveDave Kreskowiak13-Feb-05 5:52 
GeneralRe: Get Top 10 from a search engine Pin
Mohsen Saad13-Feb-05 11:57
Mohsen Saad13-Feb-05 11:57 
GeneralRe: Get Top 10 from a search engine Pin
Dave Kreskowiak13-Feb-05 16:59
mveDave Kreskowiak13-Feb-05 16:59 
Generalconcatenating wav files Pin
gilliver12-Feb-05 5:43
gilliver12-Feb-05 5:43 
GeneralRe: concatenating wav files Pin
Dave Kreskowiak13-Feb-05 17:16
mveDave Kreskowiak13-Feb-05 17:16 
GeneralRe: concatenating wav files Pin
gilliver14-Feb-05 4:55
gilliver14-Feb-05 4:55 
Generaluser defined Reports in crystal Reporting Pin
Member 121109012-Feb-05 3:40
Member 121109012-Feb-05 3:40 
GeneralExecutable code from string for a treeview control Pin
ergolabos12-Feb-05 1:32
ergolabos12-Feb-05 1:32 
GeneralRe: Executable code from string for a treeview control Pin
Dave Kreskowiak12-Feb-05 7:03
mveDave Kreskowiak12-Feb-05 7:03 

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.