Picturebox Drawing Issue - vb.net

Is it possible to fix this drawing issue that looks like screen tearing on picturebox images when scrolling flowlayoutpanel?
https://imgur.com/zPDWO85
It's much more noticeable when scrolling with a mouse compared to scroll wheel (probably due to much more draw calls).
Ideas that I found on google and tried were mostly centered around double buffering, but they didn't work.
I don't mind them pooping in that much, but that smudging is horrible and unacceptable. Best solution would be of course to make it nice and smooth without flickering, popping and whatever else it may be doing.

Related

Little "Jump" on the end of css Animation

This is a rather general Question. Using css animations or TweenMax, some Browsers seem to re-render some elements at the end of the animation, so there is a little "jump" of pixels to be seen. On some browsers it looks massive, on some you hardly notice. The smaller the image, the more obvious it becomes. Does anyone has experienced such a behaviour? And knows a bugfix? Help is very appreciated!

Unexpected behavior after zooming into a 3D object with OrbitControls + Three.js

So, I have this code. It's a small 3D scene with a ground, a red box, a custom loaded building and a rotating "sun". I'm delegating camera navigation to OrbitControls script, as it fits the most the way I want the camera to behave, however, there is a little weird problem: after I zoom in into a 3D object within this scene, rotate a little, then zoom out to "leave" the object, the zoom out process takes a billion scrolls. It's a weird behavior and I'm sorry if I'm not clear enough; once I'm in I have to scroll like forever, and every frame it seems to move "out of" the object very slowly, like the camera state is somehow screwed up.
I'm sorry if this very question has been already asked, I looked for this issue and tried stuff from other topics that seemed the same, but it didn't work.
#Edit
Wow, something even weirder. I tested zooming in this example, indefinitely, then the zoom in started to grow VERY slowly (just like in my code). Am I misunderstanding something? It looks as if the amount of zoom-in's somehow blocked rendering or something.
WestLangley tip actually solved my problem. Setting minDistance prevented the camera to zoom in infinitely, despite the actual rendering only showing a small step into the scene.

Vb.net picturebox fast move lag

When I has pictureboxes that move relatively fast at different speeds through the form on a relatively good computer it runs alright, but when I go onto a slightly worse computer, it lags if there are more then three pictureboxes moving at fast speeds on the form.Im not sure if this has anything to do with doublebuffering, could someone explain to mewhat doublebuffering is? And how I could fix my problem? The picturebox isn't a picture, just has its backcolor set to blue/red/green.
Double Buffering is explained very well here at Wikipedia.
Animated PictureBoxes can hardly be optimized, as they where never intended to be used for that.
Can you elaborate on what kind of animation you are trying to accomplish? Maybe a different approach, blitting into one PictureBox or even DirectX are more suitable for your task.
Just expanding on the above answer: if you think double-buffering is for you, do this:
In Form_Load, add the line DoubleBuffered=True.

Scaled preview: use NSTextView, NSTextField, CATextLayer, or drawInRect?

I'm programming a cocoa app that presents text (vertically and horizontally) centered on a projector screen.
I'd like to have a small preview of what I see on the "wall" in a cocoa window on the computer's screen (in a NSCollectionView). Just like "presenter mode" in Powerpoint where you see the current and the next slide as previews.
Which way do you recommend for implementing the presented text?
NSTextField turned out to be tricky for aligning and scaling the text. CATextLayer, on the other hand, feels a little bit overkill for such a simple task, even though the scaling works like a charm. Would using NSTextView or drawInRect be a good trade-off?
I appreciate your assistance in making sure that I didn't miss something out before I spend hours and days on this :) My goals are to keep it robust and simple. Thanks!
CATextLayer is definitely not overkill. In fact, a CATextLayer is considerably more lightweight than an NSView and would seem ideal for your situation.

maskToBounds:YES affecting scroll performance

I have several UIButtons on a UIScrollView. I want the buttons to have rounded corners, so I call maskToBounds: on each of them. When I do this and run on the device, the scrolling framerate is pretty bad (it works fine on the simulator). Any ideas on a workaround for this problem?
You're causing the view to be composited offscreen with that call to masksToBounds:, which slows things down quite a bit. Are you rendering custom button images? If so use UIImage -stretchableImageWithLeftCapWidth:topCapHeight: with an image which is the minimum width to encompass it's rounded edges. This allows the GPU to handle stretching the image in the most efficient way possible, while still giving you a button made out of an image. There is a session in the WWDC 2011 videos on Drawing in UIKit - watch that, as it addresses exactly this problem, and a few others you're likely to have.
A few alternative methods:
Tweeties implementation of fast scrolling, by drawing everything manually
Matt Gallaghers implementation of custom drawing. This is the method I use, as it's easy to maintain