using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsCE.Forms; //SystemSettings NameSpace
namespace Screen2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "화면 방향 :" + SystemSettings.ScreenOrientation.ToString();
textBox2.Text = "화면 해상도" + Screen.PrimaryScreen.Bounds.Width + "x" +
Screen.PrimaryScreen.Bounds.Height;
if (SystemSettings.ScreenOrientation == ScreenOrientation.Angle90)
{
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;
}
else
{
SystemSettings.ScreenOrientation = ScreenOrientation.Angle90;
}
}
}
} |