0
서버에 연결된 디스플레이의 높이나 너비를 표시하는 웹 서비스 (asp.net)가 있습니다. 그러나 localhost를 통해 호출 할 때 잘못된 디스플레이가 표시됩니다. 디스플레이가 실제로 1280x1024로 설정되면 1024x768입니다.System.Windows.SystemParameters.PrimaryScreenWidth 올바르지 않습니까?
여기에 뭔가가 있습니까?
이System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
아마도이 할 수있는 더 좋은 방법이 : 나는 또한 사용하려고했습니다
[WebMethod]
public int GetHeight()
{
return (int)System.Windows.SystemParameters.PrimaryScreenHeight;
}
[WebMethod]
public int GetWidth()
{
return (int) System.Windows.SystemParameters.PrimaryScreenWidth;
}
: 코드는 매우 간단하다? 어쩌면 텍스트 파일에 값을 저장해야할까요 아니면 더 확실한 방법이 있을까요? 아마도 설정 해상도에 대한 레지스트리를 쿼리합니까?
웹 서비스가 로컬 데스크톱에 액세스 할 수없는 서비스로 실행되고 있습니까? – Gabe
동일한 사용자로 실행되고 있습니까? 각 사용자마다 고유 한 표시 설정이 있으므로 웹 서버와 동일한 사용자로 로그인해야합니다. – CodeNaked
@gabe : 저는 이것을 믿을 수 있고 확인 할 수있는 곳이 있습니까? – Prisoner