Jump to content

guictrlcreatepic flickers when changed


Recommended Posts

I need to be able to take a screenshot and change it in the program without it flickering.

I talked to someone who mentioned double buffering... (idk) ... so I tried this...

While 1
_getnewscreenshot()
        _getnewscreenshot()
    GUICtrlSetState($screenshot2,@SW_HIDE)
    GUICtrlSetImage($screenshot2,@TempDir & '/vtemp.jpg')
    GUICtrlSetState($screenshot2,@SW_SHOW)
        _getnewscreenshot()
    GUICtrlSetState($screenshot1,@SW_HIDE)
    GUICtrlSetImage($screenshot1,@TempDir & '/vtemp.jpg')
    GUICtrlSetState($screenshot1,@SW_SHOW)
Wend

This definitely didn't help... it just flickers at a different 'tempo'...

Does anyone have any ideas?

Link to comment
Share on other sites

As a sugestion , don't know if it'll help.

You could try using a Direct3D plugin that chris95219 wrote..

Thread: Direct3D, A little test with direct3d

Use the 3D backdrop as a background then display your images as sprites, no flicker when done this way.

The D3D background can be set to any colour and it's fairly resource friendly from the short tests I've tried.

Cheers.

Edited by smashly
Link to comment
Share on other sites

I've actually got the D3D rendering the capture on the fly when viewing a desktop on my local lan, No flickering and at 0 to 2 % cpu usage, the actual script for the server is chewing the cpu usage more then the rendering of the D3D rendering..lol

Viewing a desktop from another PC at 8 pictures per second, if anything the capture function and the tcp server is whats limiting the fps.

I can view 60 fps of images a second with ease without any flickering what so ever when using already genrated pictures.

(could more then likely view 100+ pictures per second with more cpu usage though).

The limitation doesn't seem to be the D3D plugin.

Can post a crude/rough example if need be, but I'm sure others with a better scripting know how could do it in better style.

Cheers

Link to comment
Share on other sites

uhg I've been working with those links forever... I don't understand the functions, so they aren't working for me, is there an simple example someone can show me where a picture is replaced without flickering?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...