c# - How to remove my window in screenshot -
i want take screen shot in application, purpose create form contains button, when user click on button screen shot create. screan shot contains form showed! how remove form , take screan shot? need wpf form befor , after getting screan shot during creation of shot should close. how do?
you have 2 choices:
1- @richard mentioned can use windowstate minimize form, take screenshot , maximize again. should wait till full minimization. should use thread.sleep(...) method:
windowstate = windowstate.minimized; thread.sleep(500); /*or every other value waiting until minimizing completed in mili-second*/ // take screenshot windowstate = windowstate.normal; 2- can use hide , show methods form:
form1 frm = new form1(); frm.show(); //when want take screenshot: frm.hide(); thread.sleep(500); //take screenshot frm.show();
Comments
Post a Comment