lolp1 / Overlay.NET

An easy-to-use overlay library written in C# by Jacob Kemple.
730 stars 87 forks source link

WpfOverlay not rendering in loop? #16

Closed bestplay9384 closed 5 years ago

bestplay9384 commented 7 years ago

Hey,

I'm not sure, probably i'm doing something wrong, but in your WPF Demo app overriden function Draw on OverlayWindow is being executed only once for me. And on initialize everything is flickering until i touch something from overlay with my mouse. Is it normal behaviour? What i would like to do is to draw and clear the WPF Overlay in while(true) loop. Thanks for help in advance :)

lolp1 commented 7 years ago

Any chance you have xbox DVR enabled?

ErkoKnoll commented 7 years ago

I have the same problem and I did disable Xbox DVR but still have the same issue. I assume the OnDraw event should be called continuously and text you would like to update should be updated inside that method but currently it is only called few times in the beginning and then it stops. If I'm wrong then what is the correct way of updating a text on the screen?

ErkoKnoll commented 7 years ago

It seems to be WPF specific problem why it is not rendering in loop. I did recreate my own simple WPF project with transparent window and there everything seems to work. As for the flickering then it is caused by getting invalid signal whether the window is focused or not. I do recommend trying it out in release build and seeing if it is still flickering.

lolp1 commented 5 years ago

Fixing this + events soon.