Creating a component with named sub-components?

This Thread helped me creating something as we discussed yesterday. I took the package posted there and modified it a bit. Here is the source: TestComponents.pas unit TestComponents; interface uses Classes; type TParentComponent = class; TChildComponent = class(TComponent) private FParent: TParentComponent; procedure SetParent(const Value: TParentComponent); protected procedure SetParentComponent(AParent: TComponent); override; public destructor Destroy; override; function … 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 7 Webbrowser – select without value [closed]

TWebBrowser is just a wrapper for the Internet Explorer ActiveX control, so this is really an IE DOM issue, not a Delphi issue. Try setting the select element’s selectedIndex property instead of its value property: WebBrowser1.OleObject.Document.All.Item(‘year’, 0).selectedIndex := 0; The value property is what gets transmitted to the server, but only of there is an … Read more

Select Directory error … delphi 7 [closed]

var olddir: string; //global variable procedure olddiris(name:string); begin if name=”trick” then olddir:= ‘c:\program files\’+name; end; procedure MyGetPath(name:string); var options : TSelectDirOpts; begin OldDirIs(name); //returns olddir if FileCtrl.SelectDirectory(OldDir,options,0) then ShowMessage(‘i got it’); end; procedure TForm1.Button1Click(Sender: TObject); begin Mygetpath(‘trick’); end; This code runs without error… (Note: changed GetPath -> MyGetPath; added “\” to ‘c:\program files’) If the … Read more