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.
Free mode container control
Moderators: Programmer, WebWeaver, WillowsHeart
-
- Evaluation User
- Posts: 5
- Joined: Thu 19 May, 2022 12:03 pm
-
- Evaluation User
- Posts: 5
- Joined: Thu 19 May, 2022 12:03 pm
Re: Free mode container control
Nevermind, ChatGPT coded it for me
- Programmer
- Major Contributor
- Posts: 1715
- Joined: Sat 01 Jan, 2005 12:00 am
- Location: Spain
- Contact:
Re: Free mode container control
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.
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.
-
- Evaluation User
- Posts: 5
- Joined: Thu 19 May, 2022 12:03 pm
Re: Free mode container control
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!
Thank you!