convert code

H

Henk

Can somebody help me to convert this code to VB.NET?


namespace New.Controls
{

public class ExComboBox : System.Windows.Forms.ComboBox
{

public new event KeyPressEventHandler KeyPress;
public ExComboBox()
{
// hookup events
this.KeyPress += new KeyPressEventHandler(this.OnKeyPress);
}
private void OnKeyPress(object sender, KeyPressEventArgs e)
{
base.OnKeyPress(e);
}

}
}
 
L

Lubos Hrasko

I think that this C# code is trying to do something like this:

Namespace NewControls

Public Class ExComboBox
Inherits System.Windows.Forms.ComboBox

Protected Overrides Sub OnKeyPress(ByVal e As
System.Windows.Forms.KeyPressEventArgs)
MyBase.OnKeyPress(e)
End Sub

End Class

End Namespace

Cheers,
Lubos

Henk said:
Can somebody help me to convert this code to VB.NET?


namespace New.Controls
{

public class ExComboBox : System.Windows.Forms.ComboBox
{

public new event KeyPressEventHandler KeyPress;
public ExComboBox()
{
// hookup events
this.KeyPress += new KeyPressEventHandler(this.OnKeyPress);
}
private void OnKeyPress(object sender, KeyPressEventArgs e)
{
base.OnKeyPress(e);
}

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top