delphi

Delphi Error E1026 File not found: "myprojectname.tlb"

I have a project let's call it Yellow.dproj, which I saved as Blue.dproj, to make some changes. There must be some COM/DCOM related code in this project, but I can't figure out where. The error I am getting when I try to build Yellow.dproj is that it can not find a type library (TLB) file: "E1026 File not found: ". The file it can't ...

OpenGL: how to limit to an image component?

I am busy climbing the learning curve for OpenGL, using Delphi (pascal); I am using an excellent text, but every example in the book draws to the entire Form. I want to place an image component on the from, and draw to that. I tried assigning the Device context handle (GDC) to the handle of the image control's canvas, rather than to t...

Delphi 2010 AsyncPro Fax

Don't get me started on why we have to use faxes but we have to. :( Here's the issue. We are using the AsyncPro fax controls in Delphi 2010 to send faxes. It all works well, EXCEPT, if we add an area code on to the recipients phone number, say 033539901 (with 1, for the dialing prefix) the fax machine rings, it answers, but refuses to ...

How can I avoid refresh with TWebBrowser

I have a TWebBrowser component that show a Google maps page. The problem is that when user press F5 the page refresh and page reloads. This cause javascript variables to reinitialize and get out of sync with Delphi and a scripting error dialog appear, 'undefined' is null or not an object. I want to stop refresh from the user. I tried ...

How should I embed Python in a C++ Builder / Delphi 2010 application?

I'm interested in experimenting with embedding Python in my application, to let the user run Python scripts within the application environment, accessing internal (C++-implemented) objects, etc. I'm quite new to this so don't know exactly what I'm doing. I have read Embedding Python in Another Application, though this seems to talk onl...

gethostbyaddr too slow

Hi, I use the following code, results are correct, but gethostbyaddr takes around 30 seconds. function IPAddrToName(IPAddr: string): string; var SockAddrIn: TSockAddrIn; HostEnt: PHostEnt; WSAData: TWSAData; begin WSAStartup($101, WSAData); SockAddrIn.sin_addr.s_addr := inet_addr(PChar(IPAddr)); HostE...

Deployment .net 4.0 application

I intend to develop an application using .Net 4.0, and intend to use EF4 but I am little concerned with deployment of the application. My target audience will be small businesses and application domain will be related to routine accounting. There are several similar solutions already available in market and good thing about them is the...

Calling .Net unmanaged code from Delphi code

Delphi contains many types in its decelerations Type Record Type Instance Type Class They ether contain a layout of a structure, or a group of methods or a Class that contains both. DotNet contains many of these objects as unmanaged code just as you declare Delphi decelerations but they are accessed through DLL’s. 1/ The q...

How to determine the OS

how to implement a function that will return the OS name? detect the environment where the program running on? win2000/xp/vista/win7 etc...? ...

Result := TList<Something>.Create

I'm trying to write a Delphi function that returns a TList<TMyType> object. But I see that Result := tlist_instance doesn't work. What's the function to do my work? ...

How to have, Delphi source code visible during remote debugging with Delphi 2010

I'm starting with the Delphi 2010 remote debugger. There is some good information here and I can start and execute my program on the remote machine. I can't get Delphi to step through my source code though, despite the fact that when run locally, all works fine. All I get is the CPU view and any breakpoints I set get shown disabled when ...

Delphi - equivalent to C# DateTime.IsDaylightSavingTime() method needed

Hello, I need somehow to determine whether some TDateTime value is within the Daylight Saving Time range for my timezone or not (in C# the same thing does the DateTime.IsDaylightSavingTime() method). I know in Delphi there's no similar function, because Delphi TDateTime contains no information about timezone, but I suppose there's some ...

Importing MSHTML_TLB results in 12 Mb source file!

Also "generate component wrappers" does not seem to have any effect on if they're generated or not: even with this checkbox cleared when I later add the TLB into the package and install the package, it installs ~ 100 components. What to do? Apparently the space is mostly taken by "OLE Server Proxy class declaration" and "OLE Server Pro...

How to choose processor architecture to install an MSI with Delphi

Good news: A major release is in the bag! Bad news: I just found out (2 weeks too late) that some people don't have MSXML 6 on their machines and the new installer we're rolling out requires it. Good news: We can distribute an MSI file to install MSXML Bad news: There are three MSI files to choose from, one 'normal' one, one endin...

Performance issue when moving of files on network shares

Hi, I'm writing an application which can copy files on a network share. Usually the files are moved on the same physical hard drive. If you test this with Windows Explorer, this operation will be executed really quickly. It seems, that Windows knows about the same location and does a real movement and not a copy and delete (which would ...

delphi 7: How to fill a combobox from object Tcollection?

hello, I want to know if it is possible in delphi to populate a combobox component from object Tcollection. somme codes: // My product list procedure TfoMain.InitForm; begin FListProduct := TListeDispoProduit.Create(TProduct); with (FListProduct ) do begin with TProduct(Add) do begin Name := 'Product 0...

Free Delphi compiler

Is there a free official Delphi 2010 compiler available for download? I have visited embarcadero's website but only see versions that cost $1500+. ...

IBDAC / UniDAC + interbase 6 or 7 + a table field named "returning"

Hello there! I am porting REALLY old code to use the UniDAC components. I have hit a wall with a specific UPDATE sql that changes a field named "returning." Simply wrapping the field in quotes does not resolve the issue, because the SQL dialect in the database is 1, which does not support double quote field delimiters. Is there any w...

Simple Thread Sample Delphi

Hi, I am new with this stuff of Threading in Delphi. so, I am trying to make a simple query aplication that make a bit call up for the database and take a bit of time, so I want to alert the user that there is a background process and have to be patient. I tried many samples, but none of them work for me, Please, could somebody show me ...

Delphi and CreateThread()

I am calling CreateThread from a delphi application and it seems to work, however I get a system error: code 1400, invalid window handle. the code is as follow: procedure TForm1.SyncFile; var thr: THandle; thrID: DWORD; begin thr := CreateThread(nil, 0, @sync, nil, 0, thrID); if (thr = 0) then ShowMessage('Error creating th...