resolucion

26/06/2007 - 21:00 por jose | Informe spam
como puedo detectar la resolucion de pantalla en la que se esta trabajando

Preguntas similare

Leer las respuestas

#1 Angel J. Hernández M.
26/06/2007 - 21:48 | Informe spam
En Winform puedes utilizar algo así

using System.Runtime;
using System.Runtime.InteropServices;

class Interop {
[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern IntPtr GetDesktopWindow();

[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError =
true)]
public static extern bool GetClientRect(IntPtr hWnd, ref Rectangle
lpRect);
}


private void ObtenResolucionPantalla() {
IntPtr hWnd;
Rectangle rect = Rectangle.Empty;

if ((hWnd = Interop.GetDesktopWindow()) != IntPtr.Zero) {
Interop.GetClientRect(hWnd, ref rect);
}
}


Saludos,


Angel J. Hernández M.
MCP,MCAD,MCSD,MCDBA,MCT
Microsoft MVP
http://msmvps.com/blogs/angelhernandez



"jose" wrote in message
news:
como puedo detectar la resolucion de pantalla en la que se esta
trabajando
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida