Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/07/2012, 17:02
OscarSoftwares
 
Fecha de Ingreso: julio-2012
Ubicación: Distrito Federal
Mensajes: 7
Antigüedad: 11 años, 9 meses
Puntos: 0
Sonrisa Respuesta: Resolución de pantallas

Hola a mi tambien me sucedio algo parecido a tu problema yo lo que hice fue hacer una funcion , bueno esa funcion la agrego en un modulo tal y como te lo muestro :

Código:
Imports System.Drawing
Module ajustar_lapantalla
    Public Function ajustar_pantalla(ByVal forma As System.Windows.Forms.Form) As Form


        'ESTA FUNCION ADAPTA TODOS LOS CONTROLES DE UNA FORMA A LA RESOLUCION DE LA PANTALLA



        Dim z As Double

        Dim intX As Integer = Screen.PrimaryScreen.WorkingArea.Width

        Dim intY As Integer = Screen.PrimaryScreen.WorkingArea.Height

        z = (((intX) ^ 2 + (intY) ^ 2) ^ 0.5) / (((forma.Size.Width) ^ 2 + (forma.Size.Height) ^ 2) ^ 0.5)


        Dim ciclo = 0


        Do While ciclo < forma.Controls.Count

            forma.Controls.Item(ciclo).Size = New Size(((forma.Controls.Item(ciclo).Size.Width * intX) / forma.Size.Width), ((forma.Controls.Item(ciclo).Size.Height * intY) / forma.Size.Height))

            forma.Controls.Item(ciclo).Location = New Point(((forma.Controls.Item(ciclo).Location.X * intX) / forma.Size.Width), ((forma.Controls.Item(ciclo).Location.Y * intY) / forma.Size.Height))

            forma.Controls.Item(ciclo).Font = New System.Drawing.Font(forma.Controls.Item(ciclo).Font.FontFamily, (forma.Controls.Item(ciclo).Font.Size * z))

            ciclo = ciclo + 1



        Loop


        forma.Size = New System.Drawing.Size(intX, intY)



        Return forma
    End Function


End Module
DESPUES DE CREAR LA FUNCION SOLAMENTE LA INVOCAS EN EL EVENTO LOAD DE TU FORMULARIO SERIA ALGO PARECIDO A LO SIGUIENTE:

Código:
 Private Sub Form_menu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ajustar_pantalla(Me)
   
    End Sub
ESPERO Y TE SEA DE AYUDA SALUDOS