Click here to Skip to main content
15,907,396 members
Home / Discussions / C#
   

C#

 
AnswerRe: OPENCV C# The type initializer for 'Emgu.CV.CvInvoke' threw an exception Pin
kawadeprasad10-Dec-13 21:52
kawadeprasad10-Dec-13 21:52 
QuestionReal time three tier archetecture Pin
Amalrulezz9-Dec-13 17:35
Amalrulezz9-Dec-13 17:35 
AnswerRe: Real time three tier archetecture Pin
Pete O'Hanlon9-Dec-13 20:12
mvePete O'Hanlon9-Dec-13 20:12 
QuestionSecurity hacking Pin
MAW309-Dec-13 11:36
MAW309-Dec-13 11:36 
AnswerRe: Security hacking Pin
jschell9-Dec-13 15:16
jschell9-Dec-13 15:16 
GeneralRe: Security hacking Pin
MAW309-Dec-13 16:49
MAW309-Dec-13 16:49 
GeneralRe: Security hacking Pin
Dave Kreskowiak9-Dec-13 18:54
mveDave Kreskowiak9-Dec-13 18:54 
GeneralRe: Security hacking Pin
HobbyProggy9-Dec-13 21:35
professionalHobbyProggy9-Dec-13 21:35 
GeneralRe: Security hacking Pin
MAW309-Dec-13 22:59
MAW309-Dec-13 22:59 
SuggestionRe: Security hacking Pin
HobbyProggy9-Dec-13 23:44
professionalHobbyProggy9-Dec-13 23:44 
GeneralRe: Security hacking Pin
MAW3010-Dec-13 5:23
MAW3010-Dec-13 5:23 
GeneralRe: Security hacking Pin
HobbyProggy10-Dec-13 21:21
professionalHobbyProggy10-Dec-13 21:21 
GeneralRe: Security hacking Pin
jschell11-Dec-13 8:56
jschell11-Dec-13 8:56 
AnswerRe: Security hacking Pin
BobJanova10-Dec-13 4:25
BobJanova10-Dec-13 4:25 
GeneralRe: Security hacking Pin
MAW3010-Dec-13 5:14
MAW3010-Dec-13 5:14 
GeneralRe: Security hacking Pin
BobJanova10-Dec-13 5:35
BobJanova10-Dec-13 5:35 
AnswerRe: Security hacking Pin
Eddy Vluggen10-Dec-13 7:53
professionalEddy Vluggen10-Dec-13 7:53 
GeneralRe: Security hacking Pin
MAW3010-Dec-13 14:02
MAW3010-Dec-13 14:02 
GeneralRe: Security hacking Pin
Eddy Vluggen11-Dec-13 0:32
professionalEddy Vluggen11-Dec-13 0:32 
GeneralRe: Security hacking Pin
MAW3011-Dec-13 7:29
MAW3011-Dec-13 7:29 
GeneralRe: Security hacking Pin
MAW3011-Dec-13 16:30
MAW3011-Dec-13 16:30 
GeneralRe: Security hacking Pin
Eddy Vluggen12-Dec-13 8:37
professionalEddy Vluggen12-Dec-13 8:37 
QuestionEmgu CV Iris detection Pin
gouthaman939-Dec-13 6:49
gouthaman939-Dec-13 6:49 
AnswerRe: Emgu CV Iris detection Pin
Marco Bertschi10-Dec-13 0:09
protectorMarco Bertschi10-Dec-13 0:09 
QuestionConversion to VB results in errors Pin
Sonhospa9-Dec-13 6:39
Sonhospa9-Dec-13 6:39 
Dear all Smile | :)

I converted a sample from C# to VB and get an error message. It looks simple, but still I don't understand... Would it be possible that C# allows calling an event directly, while VB doesn't? Or did my conversion tool go wrong? D'Oh! | :doh:

Here's the short sample code:
private void OnWaveControlContextMenuPopup(ContextMenu menu)
 {
   if (this.WControlContextMenuPopup == null)
     return;
   this.WControlContextMenuPopup(menu);
 }
where WControlContextMenuPopup is defined as an event:
public event WControlContextMenuPopupDelegate WaveControlContextMenuPopup;

After conversion I get the error message "Public Event WControlContextMenuPopup in an event and cannot be called directly. Use 'RaiseEvent'...". The error is shown in lines 2 and 5 of the converted code:
Private Sub OnWControlContextMenuPopup(menu As ContextMenu)
    If Me.WControlContextMenuPopup Is Nothing Then             <-----
        Return
    End If
    Me.WControlContextMenuPopup(menu)                          <-----
End Sub

What would I have to change in the VB code to get the required result without error?

Thanks for some insight... Cool | :cool:
Mick

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.