Recent

Author Topic: Getting windows to open in same position - also IDE slowness  (Read 2462 times)

paule32

  • Sr. Member
  • ****
  • Posts: 280
Re: Getting windows to open in same position - also IDE slowness
« Reply #15 on: February 28, 2024, 09:42:42 am »
Paint is with the best Thing, you can do this.
Like a Image-Map, you can Code Regions, where you can Click on Mouse, to select the Color.

The Thing is, that when you use Controls for each 255 Color's, the Overhead of TObject, and
the Class stuff will be included by each Control.

But, you can Test it by reduce these Information's by using seperate derived Sub-Classes, that
contains lesser Information's as the "super" Class.

This would not be flikker free, but this could be a Deal with using OOP-Classes with Hand Coded
the Components (and/or Bounding-Boxes).

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1274
Re: Getting windows to open in same position - also IDE slowness
« Reply #16 on: February 28, 2024, 12:05:13 pm »
Jamie  told me to use a timage instead of paintbox so it would only need to be drawn once but I could not get it to work correctly.  :(
« Last Edit: February 28, 2024, 12:08:02 pm by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

paule32

  • Sr. Member
  • ****
  • Posts: 280
Re: Getting windows to open in same position - also IDE slowness
« Reply #17 on: February 28, 2024, 12:07:41 pm »
That is possible by using BltBit (win32api - or Canvas)

heebiejeebies

  • Full Member
  • ***
  • Posts: 139
Re: Getting windows to open in same position - also IDE slowness
« Reply #18 on: March 18, 2024, 10:27:05 am »
These issues are usually caused by forgetting to use BeginFormUpdate/EndFormUpdate/BeginUpdate and EndUpdate. All four of those prevent excessive painting and make your GUI much snappier.
IOW: likely programmer error. In this case: as usual.
I can not state the above four methods enough in the case of painting issues.
If you do not use those four the GUI becomes slow.

In a common GUI application there are two things that can be slow:
1. Painting
2. Queries

Or both at the same time, horror.
And that is always, without exception, programmer error.

Sorry if this is a dumb question but you're talking about slowness at runtime, right? Whereas I'm talking about slowness at design time.

I do have some occasional slowness at runtime as well that I will probably raise another thread about, but for the moment I will try and see if I can improve things by using those, thank you!
Mint 22 Cinnamon / FPC 3.3.1 / L 3.6.0

heebiejeebies

  • Full Member
  • ***
  • Posts: 139
Re: Getting windows to open in same position - also IDE slowness
« Reply #19 on: March 18, 2024, 10:28:42 am »
When you say large form, I’m curious what is the total number of controls on the form?

Probably far too many. Program is separated into about 50 different screens on a TPageControl. I don't know how else to do it considering you can't swap seamlessly between different units.
Mint 22 Cinnamon / FPC 3.3.1 / L 3.6.0

heebiejeebies

  • Full Member
  • ***
  • Posts: 139
Re: Getting windows to open in same position - also IDE slowness
« Reply #20 on: March 18, 2024, 10:30:30 am »

Add screenshots of IDE Form Designer and when your app is running to see how many controls you've placed. Maybe you have set some properties that fight each other ...

Thanks - any examples of what properties might fight each other?
Mint 22 Cinnamon / FPC 3.3.1 / L 3.6.0

 

TinyPortal © 2005-2018