EjemplosDuoc.es.tl
  Centrar Fomulario
 
Rutina que permitira centrar un formulario en las distintas resoluciones de la pantalla o formulario MDI.
Public Sub S_Centrar_Formulario(f As Form)
    Dim nLeft As Integer
    Dim nTop As Integer
   
    nTop = Int(((MDIInicio.Height - 600) - f.Height - 200) / 2)
    If nTop < 0 Then
        nTop = 0
    End If
    f.Top = nTop
   
    nLeft = Int((MDIInicio.Width - f.Width - 200) / 2)
    If nLeft < 0 Then
        nLeft = 1
    End If
    f.Left = nLeft
End Sub
 
   
 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis