Skip to main content
deleted 74 characters in body
Source Link
John Saunders
  • 161.9k
  • 26
  • 252
  • 403

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

VB Code:

I used developer fusion to convert it

Here nothing is underlined and says: End of statement expected

Public Delegate Sub ChangeMessageEvent(message As String)
    Public Shared Event ChangeMessage As ChangeMessageEvent = Nothing



 

If oStatusManager.ChangeMessage IsNot Nothing Then
                    oStatusManager.ChangeMessage(message)
                    Application.DoEvents()
                End If

for the above line

'Public Shared Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

VB Code:

I used developer fusion to convert it

Here nothing is underlined and says: End of statement expected

Public Delegate Sub ChangeMessageEvent(message As String)
    Public Shared Event ChangeMessage As ChangeMessageEvent = Nothing



 

If oStatusManager.ChangeMessage IsNot Nothing Then
                    oStatusManager.ChangeMessage(message)
                    Application.DoEvents()
                End If

for the above line

'Public Shared Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

VB Code:

I used developer fusion to convert it

Here nothing is underlined and says: End of statement expected

Public Delegate Sub ChangeMessageEvent(message As String)
Public Shared Event ChangeMessage As ChangeMessageEvent = Nothing

If oStatusManager.ChangeMessage IsNot Nothing Then
    oStatusManager.ChangeMessage(message)
    Application.DoEvents()
End If

for the above line

'Public Shared Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

added 657 characters in body
Source Link

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

VB Code:

I used developer fusion to convert it

Here nothing is underlined and says: End of statement expected

Public Delegate Sub ChangeMessageEvent(message As String)
    Public Shared Event ChangeMessage As ChangeMessageEvent = Nothing





If oStatusManager.ChangeMessage IsNot Nothing Then
                    oStatusManager.ChangeMessage(message)
                    Application.DoEvents()
                End If

for the above line

'Public Shared Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

VB Code:

I used developer fusion to convert it

Here nothing is underlined and says: End of statement expected

Public Delegate Sub ChangeMessageEvent(message As String)
    Public Shared Event ChangeMessage As ChangeMessageEvent = Nothing





If oStatusManager.ChangeMessage IsNot Nothing Then
                    oStatusManager.ChangeMessage(message)
                    Application.DoEvents()
                End If

for the above line

'Public Shared Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!

Source Link

C# to VB.NET Events

I'm having problems translating this into VB:

public delegate void ChangeMessageEvent(string message);
public static event ChangeMessageEvent ChangeMessage = null;

Also this doesn't seem to work

if (oStatusManager.ChangeMessage != null)
        {
          oStatusManager.ChangeMessage(message);
          Application.DoEvents();

}

Error MSG:

'Public Shared Shadows Event ChangeMessage(message As String)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

Thank you!