private void fullscreenBtn_Click(object sender, EventArgs e) { var princoneHwnd = Win32Wrapper.GetWindowHandle(PRICONNE_WND_CLASS, PRICONNE_WND_NAME); if ((int)princoneHwnd == 0) { MessageBox.Show(MSG_MESSAGE_START_GAME_FIST, MSG_TITLE_START_GAME_FIRST, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (Win32Wrapper.CheckWindowIsFullScreen(princoneHwnd)) { MessageBox.Show(MSG_MESSAGE_ALREADY_FULLSCREEN, MSG_TITLE_ALREADY_FULLSCREEN, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Win32Wrapper.FullScreenWindow(princoneHwnd); }