Most efficient way to position a Control

  • Thread starter Thread starter mauricis
  • Start date Start date
M

mauricis

Hello.
I have a WIN32 application with a very large number of dynamically
created controls.

Up to now I've been positioning them using:
Control.Location = new Point(X,Y)

but I've been wondering wether using:

Control.Top = Y;
Control.Left = X;

wouldn't be less "expensive" in terms of object creation/garbage
collection etc.

Do any of you know what the best option is?

Thank you very much, in advance, for your kind reply.
 
It's a WindowsForms client for Microsoft .NET Framework 1.1, to be
executed on Windows XP PCs.
 
I assumed that location was more efficient as it only had to pass the
parameters once
 
Maurice,

Than this is in my idea not the first point to optimize.
Just take the way that is to most efficient for your to write.

You will absolute not see a diiference in any way.

Cor
 
Back
Top