private void restoreBtn_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; } Win32Wrapper.RestoreWindow(princoneHwnd); }