wsMaximized forms do not appear maximized

I Can reproduce with D7/Win7. I don’t use wsMaximized at all (similar random problems as you describe). Workaround: use OnActivate -> ShowWindow(Handle, SW_MAXIMIZE) e.g.: procedure TForm1.FormActivate(Sender: TObject); begin // Maximize only once when the Form is first activated if not FMaxsimized then begin FMaxsimized := True; ShowWindow(Handle, SW_MAXIMIZE); end; end; This method will not work … Read more

How to embed a browser object, other than IE, in a Delphi application

TWebBrowser is IE. It is not a plugable construction for browsers. You can have other browsers integrated in your application. See http://www.adamlock.com/mozilla/ http://delphi.mozdev.org/articles/taming_the_lizard_with_delphi.html http://ftp.newbielabs.com/Delphi%20Gecko%20SDK/ Time has moved on This answer is from ’08 and since then time has moved on. The links don’t work anymore and there are probably better alternatives now.

What components and IDE add-ins do you install with Delphi? [closed]

My list: The Dev.Express Quantum grid: enhanced grid component: once you get the hang of this component, you can use it in all sorts of scenarios (at least I have) Dev.Express Quantum Tree list: if you know the grid component, you can use this component as well (treelist and grid combined) Dev.Express Express bars: menu … Read more

Are there any advantages in using const parameters with an ordinal type?

You need to understand the reason, to avoid “cargo-cult programming.” Marking strings as const makes a performance difference because you no longer need to use an interlocked increment and decrement of the refcount on the string, an operation that actually becomes more expensive, not less, as time goes by because more cores means more work … Read more

Calculating the speed of routines?

From my knowledge, the most accurate method is by using QueryPerformanceFrequency: code: var Freq, StartCount, StopCount: Int64; TimingSeconds: real; begin QueryPerformanceFrequency(Freq); QueryPerformanceCounter(StartCount); // Execute process that you want to time: … QueryPerformanceCounter(StopCount); TimingSeconds := (StopCount – StartCount) / Freq; // Display timing: … end;

ms sql xml data type convert to text

A simple cast will suffice: select cast(XMLCol as nvarchar(max)) as XMLCol Or for non-unicode: select cast(XMLCol as varchar(max)) as XMLCol You can’t convert explicitly to a ‘text’ data type. I’ve added the as XMLCol to ensure that the converted data has the the same name as the column. You needn’t have this, of course. EDIT: … Read more

How do I declare an array when I don’t know the length until run time?

As of Delphi 4, Delphi supports dynamic arrays. You can modify their sizes at run time and they will retain the data you stored in other elements at the old size. They can hold elements of any homogeneous type, including records and other arrays. You can declare a dynamic array the same as you declare … Read more