Tenemos que crear un formulario e introducir una etiqueta llamada label1
CODIGO
// Codigo ofrecido por Tutores.org
PrivateSub Form_Load()
Dim x AsInteger, y AsInteger
x = Screen.Width Screen.TwipsPerPixelX
y = Screen.Height Screen.TwipsPerPixelY
Label1 = "La resolucion de tu pantalla es " & x & " x " & y
EndSub
ENLACE AL CODIGO
Si quieres enlazar desde tu pagina a este codigo
<!-- Inicio enlace Tutores.org -->
<a title="Tutores.org - Obtener la resolucion de la pantalla" href="http://www.tutores.org/codigo/1596/" target="_blank">Obtener la resolucion de la pantalla</a>
<!-- Final enlace Tutores.org -->
Dim x, y As Short
x = VB6.PixelsToTwipsX(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width) VB6.TwipsPerPixelX
y = VB6.PixelsToTwipsY(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height) VB6.TwipsPerPixelY
msgbox( "" & x & "x" & y)