private void PictureBox2_Click(object sender, EventArgs e) { // 커스텀API 설정시에는 위치설정 X if (!My.Settings.CustomAPI == null /* TODO Change to default(_) if this is not a reference type */) { Interaction.MsgBox("사용자 지정 API를 해제한 후 변경하실 수 있습니다", Constants.vbInformation); goto endtask; } if (!(My.Settings.LocationName == null /* TODO Change to default(_) if this is not a reference type */)) { if (MsgBox("기존에 설정된 위치(" + My.Settings.LocationName + ")를 변경하시겠습니까?", Constants.vbQuestion + Constants.vbYesNo) == Constants.vbNo) { goto endtask; } } this.TopMost = false; Point mouseloc = new Point(Cursor.Position.X, Cursor.Position.Y); int marign = dpicalc(this, 10); var showx = Screen.GetWorkingArea(mouseloc).Width - LocationSet.Width - marign; var showy = Screen.GetWorkingArea(mouseloc).Height - LocationSet.Height - marign; LocationSet.SetDesktopLocation(showx, showy); LocationSet.Show(); this.Close(); endtask: ; }
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { isSetLocClicked = true; Point mouseloc = new Point(Cursor.Position.X, Cursor.Position.Y); int marign = dpicalc(this, 10); var showx = Screen.GetWorkingArea(mouseloc).Width - LocationSet.Width - marign; var showy = Screen.GetWorkingArea(mouseloc).Height - LocationSet.Height - marign; LocationSet.SetDesktopLocation(showx, showy); LocationSet.Show(); this.Close(); }
private void Button2_Click(object sender, EventArgs e) { LocationSet.Show(); }