delphi

Application Plugin

Hello, I'm developing some plugins to my application using the JEDI Plugin tecnology, but I run into a lot of problems with memory sharing specially when it handles Database connection. The main application uses the FASTMM4 memory manager. Does any one knows a bit more easy framework to work with plugins? ...

Subclass a table and a big trouble in Delphi

How you can see above, it's a kind of subclass a table in a RDBMS (in this case, my favorite: MySQL) so I handle it with Visual Subclassing a base form for tb_order_base with validating field data, etc. This way, I'm free of repeating code and some other bothering problems, well, it seems a true OO aproach. But ... Now I got a Big pr...

TidTCPServer Upgrade Problems

I've recently needed to upgrade an old Delphi 6 project to Delphi 2007. It is a server application using the Indy TidTCPServer component. I've followed all the examples I could find on upgrading to Indy 10. The application interfaces with an old VB6 application (that we do not have the code for) via TCP/IP. I'm having a difficult tim...

Delphi: Mimicking MS OneNote's Data Structure

MS's OneNote uses a data hierarchy that is essentially a simple tree, even though the info is displayed via a tabbed interface rather than a treeview. You begin with "notebooks," which can have "sections," which have "pages." I'm trying to model this. In my case, a page would be linked to the contents of a RichEdit. My problem is not t...

TMenuItem auto checked with Delphi 5

What is the proper way to create a custom TMenuItem which auto manage his checked property. Remember that once someone will: myHelloItem.OnClick := helloword; Then the behavior is lost... How is that accomplished in Delphi 7? regards, ...

Why does SQLyog returns MySQL query results 10x faster than my Delphi program?

select rectype,jobid,jobrecid,template,assignedto,entereddt,enteredby,ref1,processed,processeddt, processbydt,title,description,connectlanhandle,finished,updateddt,ref2,cancelled, requireaccept,acceptrejectstate,acceptrejectbydt,alert1dt,alert2dt,alert3dt,despatchallowed, flag,ref3,projectid,duration,skillset,postcode,prefschedulefrom,pr...

ADOQuery, trigger and requery bug

I have an ADOQuery that inserts a record to SQL Server 2005 table that has trigger inserting data to another table. I use following code to refresh the query and avoid Row cannot be located for updating (There are PKs on each table, UpdateCriteria property are set, Cursors are set to Dynamic, yet I still get the error sometimes. However ...

The .NET 'Type' class alternative in Delphi

I want to write in Delphi (2009 - so I have generic dictionary class) something similar to that C# code: Dictionary<Type, Object> d = new Dictionary<Type, Object>(); d.Add(typeof(ISomeInterface), new SomeImplementation()); object myObject = d[typeof(ISomeInterface)]; Any ideas? Thanks in advance, Hristo ...

is there a method to trigger paste (ctrl+v) event to any application?

I have a code that triggers PASTING to any 3rd party application by sending ctrl+v (see below), but this does not seem to work with CITRIX. is there any other method to trigger ctrl+v than keyb simulation? keybd_event(VK_CONTROL, Lo(MapVirtualKey(VK_CONTROL,0)), 0,0); keybd_event(86, Lo(MapVirtualKey(86,0)), 0,0); keybd_event(86, Lo(...

Delphi 2009: How do I prevent frame children from spilling into host form?

Ever since I upgraded to Delphi 2009, I am having terrible experience with TFrame descendants. Basically, the child components of the frame spills into the host form as object and that causes name crash, class not found etc.. In the dfm, the older Delphi used have have the frame as inline and the child components as inherited. Delphi 20...

Delphi - How Control Z Order Of TOpenDialog

I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params: TCreateParams); begin inherited createParams(Params); with Params do begin exStyle:=exStyle or WS_EX_APPWINDOW; wndParent:=getDesktopWindow; end; end; In this form, I create an instance of TOpenD...

I need to calculate the edges of visible space from current OpenGL state

In OpenGL in Delphi, I am attempting to calculate how much of a scene is viewable by finding the left, right, top and bottom extents of the viewing area in an orthographic projection. This will make some mouse interactions seem to be 1-to-1. I don't have much access to the code that sets up the orthographic projection matrix, but I kno...

Delphi 2009 - Can an Interface Property Cause a Memory Leak?

I inherited an Intraweb app that had a 2MB text file of memory leaks as reported by FastMM4. I've got it down to 115 instances of one class leaking 52 bytes. A brief description of the bad actor is: TCwcBasicAdapter = class(TCwcCustomAdapter) protected FNavTitleField: TField; function GetAdapterNav(aDataSet: TDataSet...

Delphi: TImage.Create causes Access violation

I apologize in advance for a newbie question, but why do I get "Access violation" error with the code below (on the "Create(SelectorForm);" line)? I tried using the main form as the owner, but it didn't make any difference. var SelectorForm: TSelectorForm; ArrayOfImages: Array [1..10] of TImage; implementation procedure TSelectorF...

Delphi: creating & displaying TImage on FormCreate

Being quite a newbie, I've just had my first question answered (Delphi: TImage.Create causes Access violation) to immediately bump into a new problem: procedure TSelectorForm.FormCreate(Sender: TObject); var Loop: Byte; begin for Loop := 1 to 10 do begin ArrayOfImages[Loop] := TImage.Create(SelectorForm); MainForm.MyImageL...

Website talking to client application?

I'm working on a desktop application in Delphi 2007 and on a website where content data for this application is maintained. To view this website, the user is basically restricted to Internet Explorer 7 or higher. (Not going to support the rest.) What I am looking for is a way to add a link to the website which would tell my already-runn...

Using a COM dll from C# without a type library

I need to use a COM component (a dll) developed in Delphi ages ago. The problem is: the dll does not contain a type library... and every interop feature (eg. TlbImp) in .NET seem to rely on TLBs. The component has been used in Delphi programs here for many years without problems because "It's not much of a problem using COM objects from ...

Clicking relative link goes to about:<relative link> which does not show wanted page

I am using version 14.67.9 of TembeddedWB in a project in delphi 2007. I use TembeddedWB in combination with loadfromstring. That all works like I want it to but when clicking on a link in the page it goes to a page I am not expecting. If for instance the page is on a particular IMDB result site and one clicks on the link the browser go...

Trying to locate SafeMM for Delphi

Mark Edington mentioned a Memory Manager called, SafeMM at the DelphiLive conference. I have been unable to locate it online, does anyone know where it might be available. ...

Can I create a class that is inherited from a class and from interfaces in Delphi?

I have a class TDevice. Some devices will have a cellular module. So I create an Interface IIMEI. Others devices will have an Ethernet Module. So I create an Interface IMacAddress. So, I'd like to create another class that is a child of TDevice and implements IIMEI or IMacAddress or both. Is it possible in Delphi? ...