Hi,
I am using a WinForms UserControl with a private RenderWindow property referencing the UserControl handle.
I am struggleing with the update of my UC. I tried a thread and inside OnPaint (stupid me
).
Can anyone think of a good way to get it to work?! :/
Here's my Code:
using System.Windows.Forms; using SFML.Graphics; using SFML.System; internal class Viewport
: UserControl
{ private RenderWindow _renderwindow
; public Viewport
() { _renderwindow
= new SFML
.Graphics.RenderWindow(this.Handle); } protected override void OnPaint
(System.Windows.Forms.PaintEventArgs e
) { //base.OnPaint(e); } protected override void OnPaintBackground
(System.Windows.Forms.PaintEventArgs pevent
) { //base.OnPaintBackground(pevent); } }