delphi

saving a records containing a member of type string to a file (Delphi, Windows)

I have a record that looks similar to: type TNote = record Title : string; Note : string; Index : integer; end; Simple. The reason I chose to set the variables as string (as opposed to an array of chars) is that I have no idea how long those strings are going to be. They can be 1 char long, 200 or 2000. Of course when...

Drawing and Not enough storage??

hi I want draw a table with Timage canvas but when i want draw a large table, occur this error "not enough storage is available to process this command" increase the SharedSection in Registry,but not effect at my problem. please guide me.. ...

IMAP + TLS/SSL with synapse ?

i'm currently trying to add to a software the capability to list unread emails in the user's inbox using imap. After having no success at all using indy10, I discovered synapse which seemed better for what I needed, but I can't find a way to get it working. My problem is with the login (thus I think with the ssl configuration), I can't ...

How to handle mismatched lists for a Zip algorithm

I'm thinking about writing a Delphi implementation of the functional Zip routine, which takes two lists and outputs a list of pairs of elements. So, feeding it [1, 2, 3] and ['a', 'b', 'c'] would give [(1, 'a'), (2, 'b'), (3, 'c')] as the result. Which is great if both inputs are exactly the same length, like they are in every demo I'v...

Cntl + z in delphi 4.0

Hi I am using Delphi 4 IDE. an major irritant is that i am unable to use "undo/ cntrl+z" more than twice. This is quite worriysome as i am wish to undo my changes as per need. Can one do more that 2-3 times of UNDO in Delphi 4.0? or am i missing something ? any solutions to this? thanks -Vas ...

Is there no ActiveX support for Crystal 2008 anymore?

We currently use Delphi 2005, and import Crystal 10 ActiveX controls as a Type Library to generate crystal reports. From what I've gathered, Crystal 2008 no longer supports ActiveX, so even if we upgrade to Delphi 2009/2010, it still won't be able to generate Crystal 2008 reports, is this correct? That is, there's no way for a Win32 ap...

JNA-Mapping Delphi Function

Hi! How do i map this function with JNA: Delphi code: function getData(InData1: PChar; InData2: PChar; Data: TArray16; var OutData1: PChar; var OutData2: PChar): integer; stdcall; with: TArray16 = array[0..15] of char; The int value that is returned can be 0 fo...

How to ownerdraw the scroll buttons in a scrollable Tmenu (or Tpopupmenu)?

Hi, By setting a MIM_MAXHEIGHT with SetMenuInfo, I can control the max height of a [popup]menu. When the menu appears, if it needs more height than MIM_MAXHEIGHT, it will have 2 scrollbuttons (one at the top, the second at the bottom) I do draw myself the menuitems to theme them with various flavours. But my OnDrawItem or OnMeasureItem...

Delphi ODBC Connection Dialog Component ?

Hi, I am thinking about adding ODBC database connectivity to an application. The user will at runtime configure and select their database odbc connection. Are there any components that will give me the required series of dialogs ? Allowing the user to select the data source type, select drivers, browse already defined ODBC connect...

how to map names in Delphi4

I have an Delphi 4 application, that extracts data from XLS 2003 sheets (filled Forms ) and inserts into SQL2005 DB . i have a group of fields in XSL and SQL2005 called.In the Delphi code it is correspondingly called 133, 167 etc.The words around "smrBgm133GallonsGross, .." i.e "smrBgm" and "GrossGallons" are concatinated accordingly i...

what does underscore mean in Delphi4

I come across the following in code. _name1 _name2 smeEGiGross: In general, what does _name1 underscore mean in Delphi 4? ...

loading image from URL - How to capture the exception if the image is not there

My problem relates to the other question I have asked about loading image from the URL. The code below works. However, I have encountered the problem if I try to get the image (it suppose be there) but apparently was removed. The application does not know and returns the error. Is there a way to prevent it by capturing incoming error. ...

Delphi, charset detection ([Uni]SynEdit) - Utf8Decode problem

I'm using Unicode SynEdit, which (in theory) has basic file/stream encoding detection. It worked fine until I tried opening the file which was generated by my PHP script. The file I'm talking about is detected by UniSynEdit as utf8 with no BOM. Unfortunately, it doesn't open - the loaded string is empty. I debugged it, and it seems that ...

Findfirst, findnext listing files but not directories... ?

the following code lists files but not directories var rec : tsearchrec; begin findfirst('c:\test\*',faanyfile-fadirectory,rec); showmessage(rec.Name); if findnext(rec) <> 0 then close else showmessage (rec.Name); end; ...

Cells not named in Excel sheets but still the Data from Cells need to be taken.

I have an Excel 2003 sheets being used by clients. I need to update a Delphi application that extracts data from these cells, but the cells are not named at all, they are just j3 and j55. Can the data from cells still be sent across to other applications? Can Delphi application take these values? ...

Delphi 2009 IDE Structure View Collapse function...

Hi, Does anyone know now to collapse all items in Delphi 2009 IDE structure View? I have no idea to collapse all items and that make me hard to find my class from the view. Thanks Terrance ...

How to recreate a function retrieving the highest element of an object?

My plan is to make a function that retrieves the highest element of an object, so to speak, the upper range of an array.In other words,I'm trying to get the the code of the function High(). What I have tried so far: function High2(var X):integer; begin Result:=Pbyte(Cardinal(@X)-1)^-1; end; The function above should read the va...

Is there a git plugin for the Delphi IDE?

Is there some nice git-intregation that makes life easier for the Delphi IDE (2010)? ...

How to patch a method in Classes.pas

I need to patch a method in Classes.pas (TReader.ReadString - I want to force it to use a specified codepage, not the system default). If I copy Classes.pas into my project,I will end up having to rebuild the entire VCL. Is there any (easy) way to patch a method at runtime? ...

How to set event handlers via new RTTI? [D2010]

Hi all, Playing with new RTTI module, I couldn't find a way to set an event handler with the new utilities. Trying something like this: LProp := TRttiContext.Create.GetType(Form1.ClassInfo).AsInstance.GetProperty('OnClick'); LProp.SetValue(Form1, {a TValue!}); SetValue needs a TValue passed but I've yet to find a way to represent a T...