repaint

Repaint window when no users are logged in

天涯浪子 提交于 2019-12-11 17:47:26
问题 Is it possible to repaint a window when there are no active users logged on to a windows machine using c sharp? And will that window be available to screen capture program? Or is it not possible at all and a user must be logged into the machine. I make use of the below: SetForegroundWindow(handle); InvalidateRect(IntPtr.Zero, IntPtr.Zero, true); UpdateWindow(handle); Thanks all for any help 回答1: Since there is no user logged in, there is no UI running. So, no, you can't repaint under such

How to control the painting of the player

若如初见. 提交于 2019-12-11 16:30:48
问题 I am trying to draw something on a live video. The best way to do that in my opinion is to handle the WM_PIANT event. My purpose is to make the player draw first and after that the application. That way I will be able to draw on the video. It means that I want to be notified each time before we need to paint a new frame on the window and then handle the event. I use DirectshowNet so I am programming in C# (I have all the interfaces the c++'s API has). I understand that the graph manager

Alternatives to re-flow and re-paint

拜拜、爱过 提交于 2019-12-11 16:20:17
问题 I've read on SO and elsewhere that re-paints and re-flows are expensive for the browser to perform. I'm curious about CSS/JS alternatives to re-paint/ display:none and re-flow/ visibility:hidden that aren't as computationally demanding for the browser. Just to be clear, and please correct me if I'm wrong, a common re-flow scenario is when you set display:none on element that you want to toggle the display of, e.g., a dropdown menu. The re-flow means that the browser first "flows", i.e.,

Repainting a JPanel with data from another object (thread)

不羁的心 提交于 2019-12-11 12:49:18
问题 I'm facing a problem where a JPanel takes data from an object which has a cycle updating its state variables. The scenario is as follows: a JFrame calls a method of the object, the method creates the second JFrame has a cycle then updating a state variable. The second JFrame access that variable and should be displayed in a JPanel, but no, the GUI hangs. I reduced the problem to an example with the same behavior so it can be easily tested. I appreciate any help, thanks! Starter.java public

Repainting an instance of a class from an ArrayList

孤人 提交于 2019-12-11 12:25:52
问题 Ok so I am very new to Java Swing and a beginner in Java in general. My current problem is I have designed a "cityscape". I am working on a UFO flying around, but my randomly generated buildings continue to get regenerated. I am wondering if there is a way to save my instance of buildings to an ArrayList as I have attempted, and paint that selection from that list each time paint is called. I tried what I thought of and I believe it just crashed it when run, because it didn't even open a

Cellpainting checkbox or paint part of the cell

别等时光非礼了梦想. 提交于 2019-12-11 10:14:36
问题 I have this situation with DataGridView in Winforms. I want to achive something like this, with some separation between rows The image and address N39 are actually on 2 columns, with no horizontal margin and no column grid line to make it look like they belong to a whole. To achieve sepration between rows, I override CellPainting and repaint the whole grid, using from Graphics.FillRectangle (with height less than cell height), Graphics.DrawLine to Graphics.DrawString and Graphics.DrawText to

Java, how to refres JTable

谁说我不能喝 提交于 2019-12-11 08:12:03
问题 I have two JTables. One is for the list of invoices and the other is for the list of products in invoices. I have created a listener so that I can get id value of invoices from first JTable with a mouse click, then using another method I generate a new table content for other table (method works fine). However, after updating table, I have tried to find ways to refresh it, unsuccessfully... I'm just looking for a way to refresh the second table the moment I trigger the mouse event Here are

How do I repaint a form after it was restored from a minimized state?

牧云@^-^@ 提交于 2019-12-11 07:58:47
问题 I have a form in which i paint a waveform on a button click that is as soon as i click button, the waveform displays. Now when i minimize the form and maximize it again, the waveform disappears.How to repaint it? I have seen people using paint event but i dont know how to use it after/inside the button click event. Please help. 回答1: If you call Control.Invalidate(), the Paint event will occur. 来源: https://stackoverflow.com/questions/2665900/how-do-i-repaint-a-form-after-it-was-restored-from-a

Repainting/refreshing JLabels on a JPanel

梦想的初衷 提交于 2019-12-11 07:01:17
问题 I'm having trouble getting my JLabels in a 2D array to update during runtime. The program I'm working on is a variant of Connect Four. I create a 2D array of JLabels, which all default to an ImageIcon containing an image of a blank slot. Players 1 and 2 choose their colors, and on a player's turn, he can click to drop a piece into a column (gravity causes the piece to fall to the bottom or until it lands atop another piece). I'm pretty positive that my addToColumn method is working fine. My

IOS iphone 4s not repainting dynamic images that are initially outside the viewport

谁都会走 提交于 2019-12-11 05:46:06
问题 I have been suffering from a bug for sometime: I am doing something like the following: $container.on('touchmove', function(){ $container.trigger( 'lazyload.appear'); }); $img.one( 'lazyload.appear', function(){ var that= this; var $self= $(that); $self.css('background-image', "url('real.path.to.img')" ); }); However, on IOS there seems to be a problem with repainting the background-images, when they are initially outside the viewport. When I drag my finger, until the image is in the viewport