c# - How to place a windows form in screen coords and close it on command? -
i working on c# console program on windows move window, part of trying create transparent box @ target destination give user visual confirmation of new location. facing 2 main problems: i want place form in screen coordinates i want able close window after user has confirmed decision. currently have code in library console client calling this: public static void createbox(rect rectangle) { form f = new form(); f.name = boxname; f.backcolor = color.blue; f.formborderstyle = formborderstyle.none; f.bounds = new system.drawing.rectangle(rectangle.left, rectangle.top, rectangle.right - rectangle.left, rectangle.bottom - rectangle.top); f.topmost = true; f.opacity = 0.5; application.enablevisualstyles(); task.run(() => application.run(f)); } and after searching questions on here have come attempt close form later: public static void removebox() { form f = application.open...