penguindori
2009. 5. 28. 11:04
1. 관련 소스
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;
}
}
}
} |
2. UI 관련
0. Base : Panel
=> 기본적으로 폼 위에 Panel을 올리고 속성에서 Dock : Fill
1. 화면 전환 : Button
=> 속성에서 Dock : Top
2. textBox1 : 화면 각도 표시
=> 속성에서 Dock : Top
3. 하나,둘... : Grid
=> 속성에서 Dock : Top
4. textBox2 : 해상도 표시
=> 속성에서 Dock : Bottom |
=> Result
http://windowsmobile7.tistory.com/5 [참조]