Page 1 of 1

Free mode container control

Posted: Wed 07 Aug, 2024 11:18 pm
by obsidiantarot
Hi, i have a little question:

Wich container or controls are you using to hold the cards together when on free mode?.

I've tryed to use a panel and multiple pictureboxes, some dinamically created pictureboxes, custom controls, forms... always what i get is a lagged and flickering mess with a lot of CPU consumption, even with double buffering enabled.

Yours is runing smoothly :_(

Maybe you're using some kind of sorcering-based alignment routine?

Hope you can help me.

Thank you in advance.

Best regards.

Re: Free mode container control

Posted: Sun 11 Aug, 2024 7:54 pm
by obsidiantarot
Nevermind, ChatGPT coded it for me ;)

Re: Free mode container control

Posted: Mon 26 Aug, 2024 3:43 pm
by Programmer
Ha ha, we will all be out of a job soon!

As you probably realized, there is only one relevant control on the deck, which is a picture box. Whether it is in Free Selection Mode or normal mode it shows a single image which is updated dynamically at run time as you move your mouse over the form. When calling refresh on the picture box it passes in arguments to just repaint the relevant portion of the fanned out deck, instead of trying to repaint the whole thing each time.

Re: Free mode container control

Posted: Tue 27 Aug, 2024 11:29 am
by obsidiantarot
Finally i did not use Picturebox control, i painted the cards directly over one single form using the Paint event of the container form. I've saved 90% of CPU consumption this way and it's not lagging anymore.

Thank you!