delphi

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

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 bec...

Delphi ADO Query - Concatenate result sets

I am writing an application that allows a user to submit a query to multiple systems. I then save each report from each system using SaveToFile, which saves it as an XML document. The user can then inspect each report by selecting it from a menu, and the report is displayed by loading the report back into an ADO Query component (using ...

how to create Delphi 4 structure to map column names in XLS to column names in SQL

I have an EXCEL sheet.it has various form-fields that are named as “smrBgm133GallonsGross/ smrBgm167GallonsGross “ and “smrEgm133GallonsGross/ smrEgm167GallonsGross “ I added to the XCEL sheets 2 new form fields named smrBgm167GrosGalnsDA/smrEgm167GrosGalnsDA The above additons I made in EXCEL should ACTUAL...

Delphi function to convert a string to DOS format

Hi, I'm using the FINDSTR function to filter text files, but it's failling on extended ASCII characters. I tried using the CharToOEM function, but I still have characters such as 'à', which FINDSTR doesn't seems to recognize. I want to use FINDSTR because the text files I work with are 100MB big, so I need something fast. Does a functi...

Getting IDE Fix Pack 2 to work

On Previous Question, someone recommended that I install Andy's IDE Fix Pack to get rid of an 'Undeclared Identfier' error in Error Insight with D2009. It worked. However, I had to uninstall it (long story). When I re-installed, it no longer fixes the problem I was having. No matter how many times I uninstall, then re-install, I'm ...

Undeclared identifier:

I have an EXCEL sheets witgh various C:\Documents and Settings\delfi\MilkDataMgr\FtsExcel.pas(2056):Undeclared identifier: smrBgm167GallonsGrosssDA' procedure convertXSLToDelfi(fuel: TFtsFuelTypes; const prefix: string); var ColumnNameMap : TStrings; i : Integer; other : string; begin { ColumnNameMap := TS...

Delphi, MDI vs Tabs for multi-document interface

I'm developing a multi-document application. Currently it uses MDI which is quite convenient for me (as a developer) as well as for users I believe. However there is one "against" - I haven't found a solution to quickly load many child windows (each time the window is created and maximized to fill the parent's area, there is an 'animatio...

Shift+Ctrl+0 key combination not seen by application on Windows Vista

I start with a new Delphi VCL application, add Menus to the uses clause, drop a label on the form, and assign the form's OnShortCut event: procedure TForm1.FormShortCut(var Msg: TWMKey; var Handled: Boolean); begin Label1.Caption := ShortCutToText(ShortCut(Msg.CharCode, KeyDataToShiftState(Msg.KeyData))); end; On XP, this works corr...

I want to use Infocardapi.dll in Delphi/WIN32 but would like a header file for it.

Microsoft has this nice little feature called CardSpace. This is a Microsoft implementation of InfoCards. Microsoft has a nice document which explains how it can be used, which is useful. And doing a Google search doesn't provide me many useful answers but it does provide an enormous amount of noise. (Mostly because people wonder what it...

Delphi, frames vs forms. What for multi-document interface?

Hi, yesterday I've started discussion on "MDI vs tabbed interface". I've asked whether should I continue developing my app as MDI-based, or should I embed the child forms into tab sheets. Someone pointed that I should use TFrames instead... My question is: why? What are pros of using TFrames when embedding the form over TFrame? So far I...

cant delete a folder using deletefile command

procedure TForm1.Button1Click(Sender: TObject); begin if not deletefile('c:\test') then raiselastoserror end; i get os error 5 : access denied when i use the same code to delete a file say wwj.txt it works fine but doesnt work for folders what am i doing wrong? ...

CueText equivalent for a TMemo

I have this Delphi code to set the cue text of a control on my form: procedure TfrmMain.SetCueText(edt: TWinControl; cueText: string); const ECM_FIRST = $1500; EM_SETCUEBANNER = ECM_FIRST + 1; begin SendMessage(edt.Handle,EM_SETCUEBANNER,0, LParam(PWideChar(WideString(cueText)))); end; I want the same effect on a TMemo, but ...

[Delphi] Chinese Symbols When Loading Text

Hello, I am loading text from text file to richedit but it displays weird Chinese symbols instead, what am I doing wrong? ms := TMemoryStream.Create; ms.LoadFromFile('C:\aw.txt'); ms.Seek(0, soFromEnd); zChar:=#0; ms.Write(zChar, 1); ms.Seek(0, soFromBeginning); RichEdit1.SetSelTextBuf(ms.Memory); ms.free; ...

What can cause System.Move to occasionaly give wrong results?

The last few days we have had some strange problems with our database components developed by a third party. There has been no changes to these components for months. The code that HAS changed the last few days is our own code and we have also updated our gui-components developed by another third party. After debugging I have found ...

Delphi 2009 - Handle when window is restored via double clicking the SysMenu?

Hi, I need to handle when the user restores the form by double clicking the title bar. I tried handling the WM_SYSCOMMAND window message however this only works if the user restores the form via clicking the restore button in the system menu. I am using DevExpress ribbon form components if this matters. Thanks. ...

missing "htmlview.dcu"

While compling Delphi application there is an error "file not found "htmlview.dcu". The errror is not on my system ,but someone else's. I checked it my system and its there in " C:\Program Files\PBear\Thtml\package". Whats the remedy if there is an error "file not found "htmlview.dcu". ...

Getting a longer stacktrace from FastMM?

When FastMM logs a memory leak it includes a stacktrace going back 9 calls. Problem is that the stacktrace is too general to locate the problem easily. The last function call in the trace is called at least 50 times and the object leaked is a very common one. What can I do to make the stacktrace longer? Tips to locate leaks more easily...

Regular Expression Problem: Match in Context

I have a structured file with hierarchical text which describes a GUI in Delphi (a DFM-File). Let's assume I have this file and I have to match all "Color = xxx" Lines, which are in the context of TmyButton (marked), but not those in other context. Within the TMyButton-Context there won't be a deeper hierarchical level. object frmMain:...

Zeroconf / Bonjour and Delphi

Hi, Has anyone toyed with, or got an example for loading and using the dnsds.dll (zeroconf / bonjour / dns-ds) via Delphi. I have a c# version, but that isn't quite what I want. Thanks ...

Flipping through two forms.

I am just wondering if I'm doign something that might be bad, although it seems a very practical solution to me... I have two forms which the user will have to walk through. The user clicks on a button and form1 pops up. The user presses OK and the second one pops up. The user click OK again and the screens are gone. Or the user clicks ...