The standard ways to force a repaint are
Control.Invalidate
or
Control.Refresh
Force Paint refresh on control
NachitoMax
416
Reputation points
Hey
I am populating a picturebox with a view from an application. The picturebox isnt exactly showing an image, rather it is showing a visual view of a window. The 3rd party application requires a display object to hook into a uses its hwnd like this
oClientView = oAppDoc.ClientViews.Add(PictureBox1.Handle.ToInt32())
This is ok and displays as expected but, only displays once i have moved my mouse over it. Id like to try and force a paint event to do this as it loads but cannot really find anything useful.
How can i force a paint event to trigger in order to display the view?
Thanks
1 answer
Sort by: Most helpful
-
Castorix31 86,496 Reputation points
2021-03-11T15:31:09.1+00:00