Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/01/2009, 16:08
Pax-Man
 
Fecha de Ingreso: noviembre-2003
Mensajes: 403
Antigüedad: 20 años, 6 meses
Puntos: 4
pasar el nombre del form como una variable

Pues requiero algo de ayuda, tengo el siguiente problema deseo pasar el nombre del formulario como una variable.... para usarlos en una funcion y esta se efecute...

Tengo el siguiente codigo:
Asi llamo la clase y paso el nombre del form:
Código:
Call inicio_de_tablero(Me.Name)
Esta es la funcion:
Código:
    Sub inicio_de_tablero(ByVal nombre As Form)
        If Str(nombre.Name) = "tablero" Then
            tablero.Width = Screen.PrimaryScreen.Bounds.Width
            tablero.Height = Screen.PrimaryScreen.Bounds.Height
            tablero.FormBorderStyle = FormBorderStyle.None
            tablero.WindowState = System.Windows.Forms.FormWindowState.Maximized
        End If
        nombre.TopMost = True

    End Sub
Me arroja el siguiente valor:
Error 1 Value of type 'String' cannot be converted to 'System.Windows.Forms.Form