delphi

Weird call stack when application has frozen

I apparently have an dead lock problem in one of my applications and started investigating EurekaLog stack traces. Here's one recent: Call Stack Information: -------------------------------------------------------------------------------------------------------------------------------------- |Address |Module |Unit ...

Connecting to SQL Server 2005 via web service

Delphi 2010, dbExpress, and SQL Server 2005 DB I am trying to make a connection to a SQL Server 2005 DB using Delphi 2010 & DBExpress. If I create a standard delphi application and hard code my connection (IT WORKS!): procedure TForm1.Button1Click(Sender: TObject); var Conn: TSQLConnection; begin Conn:= TSQLConnection.Create(nil); ...

The application called an interface that was marshalled for a different thread

i'm writing a delphi app that communicates with excel. one thing i noticed is that if i call the Save method on the Excel workbook object, it can appear to hang because excel has a dialog box open for the user. i'm using the late binding. i'd like for my app to be able to notice when Save takes several seconds and then take some kind ...

Delphi - Memo Right Click Get Line Number

How do I get the line number of a memo when I right click on it? A ListBox has .ItemAtPos but I've not been able to find a similar function -Brad ...

Practical usage for Delphi's new RTTI - Attributes,Values

I found great explanation about the new RTTI in Delphi,but I don't understand one important thing about all I have read - Where can I use that? What is it supposed to replace? ...

Why doesn't my cursor change to an Hourglass in my FindDialog in Delphi?

I am simply opening my FindDialog with: FindDialog.Execute; In my FindDialog.OnFind event, I want to change the cursor to an hourglass for searches through large files, which may take a few seconds. So in the OnFind event I do this: Screen.Cursor := crHourglass; (code that searches for the text and displays it) ... Screen.Cursor := c...

How to send an email with a calendar request (content type: text/calendar)

I have tried to embed the icalendar code in a email to be sent via indy with a content type text/calendar but it just hangs on the encoding of the email when I add as an attachment it just arrives as an attachment and does not prompt as other calendar request do. Has any one got example code of how to do calendar requests via indy? ...

How do I install both D2007 and D2010?

From what I have gathered, one can have both editions of Delphi installed. My concern is that default paths, etc, may get confused especially when installing 3rd party components. The reason why I want to do this is I have some 3rd party components which have not been updated. Although I have the source files, I'm not knowledgeable enou...

Generic TypeIdenitifier convertion.How?

How do I convert the TypeIdenitifier to a class type? I need to use implicit convertion. type TMyChildArray<T>=class(TMyArray<T>) private FData:Array of T; procedure AddEnd(); end; TTypeIdenitifierParentClass=class(TAnotherParentClass) protected TestField:Cardinal; end; procedure TMyChildArray<T>.A...

How to disable WebBrowser component from loading images?

Just loading html without images? ...

Why looping in Delphi faster than C#?

Delphi: procedure TForm1.Button1Click(Sender: TObject); var I,Tick:Integer; begin Tick := GetTickCount(); for I := 0 to 1000000000 do begin end; Button1.Caption := IntToStr(GetTickCount()-Tick)+' ms'; end; C#: private void button1_Click(object sender, EventArgs e) { int tick = System.Environment.Tick...

How to show scrollbars in TScrollBox after it has been made visible again?

Hi, I've ran into one small problem. I am dynamically generating some controls and place them on a TScrollbox component. But I noticed that if the scrollbox is visible, user can clearly see each of the controls being created and placed. So it looks like lots of work is being done and it is slow. I hid the scrollbox and generated all th...

alternative ways to blockwrite ?

hi all is there any alternate ways to blockwrite ? now in my app i am using it like this BlockWrite(file, buffer[1], Length(buffer)); i want to know alternate ways writing string to an exe file(binary ) just want to know different methods :) can any one help me thanks in advance ...

indy or ICS or ?

Can any one tell me which is more stable? I know each has their own advantages and disadvantages. But which one is better for http, etc? In my previous application I used indy9 but I wasn't satisfied with it, as I would sometimes get strange errors. Can anyone recommend one? ...

Best way to create a collection of a class

I'm trying to create some classes that allow me to retrieve and manipulate a set of backups my application will create and manage. I've come up with the following code (not tested yet), but I'm not sure if it's the best way of accomplishing this or if there's any easier/better way. I'm using Delphi 2010. I have a class that holds the b...

How to detecting .net framework version with Delphi 7

How to detecting .net framework version with Delphi 7 ? ...

How to use SetTextCharacterExtra in TEdit or TMemo?

Hi, Does anybody know any component based on TEdit or TMemo, in which is possible to set different intercharacter spacing? Win API SetTextCharacterExtra solves the problem for Tcanvas, but I tried hard to implement this behavior as a property for my own TEdit Component (a year ago) and despite of my various desperate attempts to do this...

Indy FTP, large files and NAT routers

Hello! I have been using Indy to transfers files via FTP for years now but have not been able to find a satisfactory solution for the following problem. When a user is uploading a large file, behind a router, sometimes the following happens: the file is uploaded OK, but in the mean time the command channel gets disconnected because of ...

A few problems with Delphi involving Mail Merge, SQL + Databases.

My first problem is with mail merge. I have created a a Data File and a table, yet I am not able to fill my table with information from my Data File. The <<>> just seems to be inserted after wherever the cursor is on the page, which is not where the table is. All that is entered into the actual table is a '59'. Therefore I think I either...

Registry ReadString method is not working in Windows 7 in Delphi 7

The following code sample used to return me windows id before, but now it doesn't work, and returns empty string, dunno why. function GetWindowsID: string; var Registry: TRegistry; str:string; begin Registry := TRegistry.Create(KEY_WRITE); try Registry.Lazywrite := false; Registry.RootKey := HKEY_LOCAL_...