#컨트롤에 포커스가 자동으로 안갈 때
#컨트롤에 포커스가 자동으로 안갈 때
#컨트롤에 포커스가 자동으로 안갈 때
#컨트롤에 포커스가 자동으로 안갈 때
case WM_PAINT:
if(toggle==0)
{
this.Size = new Size(1000,600);
this.Text = "TRIS BY CONSOLE FORM";
graphics = CreateGraphics();
font = new Font("바탕체", 17, FontStyle.Bold);
toggle=100;
timer = new System.Timers.Timer();
timer.Interval = 800;
timer.Elapsed += new ElapsedEventHandler(__time_tick);
timer.Start();
mainBackColor = this.BackColor;
MessageBox.Show("TRIS START, Time Interval:" + timer.Interval);
//Form에 focus가 가도록 하기. 키보드 컨트롤을 이용할수 있다.
this.Activate();
this.Focus();
var handle = GetConsoleWindow();
ShowWindow(handle, SW_HIDE); // 숨기기
init(ref t_tris, ref xpos, ref ypos, ref __design);
DrawTerisAll(t_tris);
}
break;
'c# 언어' 카테고리의 다른 글
Color.FromArgb List (0) | 2021.07.09 |
---|---|
Color class 배열을 이용한 다양한 색상나타내기 (0) | 2021.07.09 |
Tris Form Game by console base(HatchStyle 적용) (0) | 2021.07.06 |
Graphics graphics = CreateGraphics(); (0) | 2021.07.05 |
C# 콘솔프로그램에서 콘솔창 숨기기 (0) | 2021.07.02 |