Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/11/2008, 11:12
Avatar de freegirl
freegirl
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: Catalonia
Mensajes: 4.334
Antigüedad: 20 años, 7 meses
Puntos: 156
Pregunta traducir de c# a vb

Buenas,

tengo que traducir esto a VB. He probado con un traductor online, pero no me lo acaba de pillar en VB. A ver si alguien me puede echar un calbe

Código:
      if(_frm != null) {
             _frm.KeyPress -= new KeyPressEventHandler(this.event_KeyPress);
              _frm.MouseDown -= new MouseEventHandler(this.event_MouseDown);

             foreach(Control _ctl in _frm.Controls) {
                  _ctl.KeyPress -= new KeyPressEventHandler(this.event_KeyPress);
                   _ctl.MouseDown -= new MouseEventHandler(this.event_MouseDown);
               }
yo lo tengo así, y lo que está en rojo está c omo "error".

Cita:
If Not (_frm Is Nothing) Then
_frm.KeyPress -= New KeyPressEventHandler(Me.event_KeyPress)
_frm.MouseDown -= New MouseEventHandler(Me.event_MouseDown)

Dim _ctl As Control
For Each _ctl In _frm.Controls
_ctl.KeyPress -= New KeyPressEventHandler(Me.event_KeyPress)
_ctl.MouseDown -= New MouseEventHandler(Me.event_MouseDown)
Next _ctl
End If
saludos