Form is hidden behind other forms when ShowModal is called

You didn’t mention which version of Delphi… Newer Delphi versions have added two new properties to TCustomForm: PopupMode and PopupParent. Setting PopupParent of your modal dialog to the form that’s creating that dialog makes sure that the child form stays on top of it’s parent. It usually fixes the problem you’re describing. I think this … Read more

How can Delphi ‘string’ literals have more than 255 characters?

why did not delphi give any error saying the length is beyond 255 for myExtremlyLongString? You have your answer a bit down in the text in section Long String (AnsiString). In current versions of Delphi, the string type is simply an alias for AnsiString, So string is not limited to 255 characters but a string … Read more

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

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 hard is it to migrate a project from Delphi 7 to Delphi XE?

The only real problem is conversion to Unicode. You should learn how Unicode support is implemented in Delphi – start from Marco Cantu White Paper: Delphi and Unicode It is impossible to estimate the amount of work required to upgrade old applications to Unicode without knowing the actual code. If you were using string types … Read more

Antivirus False positive in my executable

It is surprisingly common that Delphi applications are reported as (potentially) harmful by AV applications. It happened to me a while ago, using Delphi 2009, see http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Computing/2010_March_20#Delphi.2FAVG_Issue. At SO, we also have Virus in Delphi 7 Accidentally created a virus? and many more. It might be the actual Induc Virus. But most likely, it is … Read more

Delphi: StringList Delimiter is always a space character even if Delimiter is set

You should set s1.StrictDelimiter := True for spaces not to be considered delimiters, more info here. Since you work in a version that does not support the above (as was clarified after the answer was submitted), you have two options: Find a character you know will not be used in the original text (e.g. underscore), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)