Message 1 of 3
button event vb.net vs. C# please help.

Not applicable
03-26-2010
11:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
New to C#
I have this code in vb.net and am trying to get this to work in C# can anyone please help.
vb.net code:
Private WithEvents my_button1 As Inventor.ButtonDefinition
Private Sub my_button1_OnExecute(ByVal Context As Inventor.NameValueMap) Handles my_button1.OnExecute
MsgBox("You Clicked Me")
End Sub
C# code:
private Inventor.ButtonDefinition my_button1;
How do I declare the button event?
private void my_button1_Onexecute(NameValueMap context)
{
//show messagebox
MessageBox.Show("You Clicked Me");
}
Regards.
Kent boettger Edited by: Kent_boettger on Mar 26, 2010 6:19 PM
I have this code in vb.net and am trying to get this to work in C# can anyone please help.
vb.net code:
Private WithEvents my_button1 As Inventor.ButtonDefinition
Private Sub my_button1_OnExecute(ByVal Context As Inventor.NameValueMap) Handles my_button1.OnExecute
MsgBox("You Clicked Me")
End Sub
C# code:
private Inventor.ButtonDefinition my_button1;
How do I declare the button event?
private void my_button1_Onexecute(NameValueMap context)
{
//show messagebox
MessageBox.Show("You Clicked Me");
}
Regards.
Kent boettger Edited by: Kent_boettger on Mar 26, 2010 6:19 PM