delphi-2009

OpenDialog does not show up in Delphi MultiThreaded application

女生的网名这么多〃 提交于 2019-12-12 09:06:53
问题 i tried to use the openDialog in new thread but it made so strange behavior .. if i put the if opendialog.execute then in the create constructor like this : constructor TChatMemberThread.Create(Name: string); begin inherited Create(True); FName := Name; FreeOnTerminate := True; Opendialog := TOpenDialog.create(nil); if opendialog.execute then for 0 to opendialog.filescount do somecodeishere end; end; the opendialog open normally but when i put it in the execute producer of the thread it didn

Where Is TShellListView in Delphi 2009?

别等时光非礼了梦想. 提交于 2019-12-12 08:13:22
问题 We have recently moved to Delphi 2009. I can't find the TShellListView and TShellTreeView controls. Do I need to install something extra? From searching the web it seems they are shipped with Delphi 2009 but for some reason they havent been installed. Has anyone had a similar problem? Answer here 回答1: It looks like this package is not installed by default. Navigate to Delphi demos (they are in "c:\Users\Public\Documents\RAD Studio\6.0\Demos" on my machine; you should replace 6.0 with the

How do I access the child node values in my XML document?

為{幸葍}努か 提交于 2019-12-11 17:59:11
问题 I have a XmlString which contains multiple elements with their nodes. ie <Element> <AccountName>My Account Name</AccountName> <FullName>Edward Jones</FullName> </Element> I can access the Node names ie AccountName, FullName, but I can't access the values or they return blank. Here is my code. Doc : IXMLDocument; begin Doc := XMlDoc.LoadXMLData(XmlString); Doc.DOMDocument.getElementsByTagName('Element').length; // = 11 Doc.DOMDocument.getElementsByTagName('Element').item[2].childNodes[0]

How to make package dependencies/requirements dependent on conditional symbols?

本秂侑毒 提交于 2019-12-11 16:11:43
问题 I have a package Package1 which depends on package PackDependency . The .dpk of Package1 contains this: requires vcl, rtl, PackDependency, dbrtl; Now I want to have this dependeny only if a conditional symbol CONDITION is defined. Thus I change the .dpk file manually to: requires vcl, rtl, {$IFDEF CONDITION} PackDependency, {$ENDIF} dbrtl; But is this enough? I am worried about the .dproj files. I have two packages like Package1 I want to do the above with. One of them has the following line

Delphi 2009 startup error

坚强是说给别人听的谎言 提交于 2019-12-11 13:39:52
问题 When I click Delphi 2009 to start it shows me this error. 回答1: This embarcadero forum message discusses the same issue you are having. Does it occur when you run with the -np switch? 来源: https://stackoverflow.com/questions/4144199/delphi-2009-startup-error

Excel type library / Delphi 2009/ bad variable type

一笑奈何 提交于 2019-12-11 13:07:11
问题 We have just updated an application which uses the Excel type library to Delphi 2009 from Delphi 2006. What I am finding is that nearly nothing now works - nearly any call to Excel results in a message "Bad variable type.". For example we may do: Sheet.Cells.Item[Row, Column].Value := Value where Sheet is an ExcelWorksheet and Value is a Variant. The next thing we see in the stack is a call to _DispInvoke in Variants, and then on into ComObj. What am I doing wrong? 回答1: I can advise you to

Delphi 2009 - How to fix 'undeclared identifiers' that are identified

江枫思渺然 提交于 2019-12-11 12:33:08
问题 I have several custom components in my uses list of a unit. For some reason, D2009 is saying that it cannot resolve the unit name. But it seems as if it can find it - the code compiles fine. How can I have it resolve the unit names at design time though? My Structure window is showing all kinds of 'Undeclared Identifier' errors because the references in the Uses clause are not being found. This makes it difficult to code, and to debug legitimate errors in my code. 回答1: I think this is

Determine Height of text in TMenuItem to decide to what height to change the MenuItem via TMenuItem.OnMeasureItem

倖福魔咒の 提交于 2019-12-11 12:05:29
问题 I use Borland C++ Builder 2009 and when a large font is used, the Menu items in MainMenu and Popup are too close to each other, text cut off on top and bottom even, when too big. I understand I can change the height of the items with TMenuItem.OnMeasureItem but to what height should I set it ? What's the best way to calculate an ideal height and how do I get the variables for it (e.g. height of text)? 回答1: OnMeasureItem handlers suggests you default value in Height var parameter. You can

How to setup the JIT debugger in Delphi 2009?

一笑奈何 提交于 2019-12-11 11:55:55
问题 On my machine I have Visual Studio 2008,C# Express,Delphi 7 and Delphi 2009 Architect(No updates). When I usually run Delphi 7,it notifies that the JIT debugger is currently set to another application(Visual studio in my case) and asks me if i'd like to change it to Delphi. If I press Yes,I can use the debugger in Delphi 7,otherwise I can't use it. My problem is that in Delphi 2009 the IDE doesn't ask me to do this and even worse - a crash occurs when I open/create a project. How do I setup

(Delphi 2009) idIRC, MDI, and problems with hanging

空扰寡人 提交于 2019-12-11 11:53:23
问题 I'm working on an IRC client. I've hit a majors snag which, up until not I've been able to work around. I'll show code below. What's I'm having a problem with is creating MDI child windows within the event handlers of idIRC. For example, if I want to create a new channel form (FrmChannel), I can accomplish this easily by calling it's create procedure when I catch the '/join' command. However, if I want to do it the right way, and wait until I've actually joined the channel, and receive