delphi

System Tray Icon not appearing on startup

I use the following code in the FormCreate event handler to create a system tray icon. When I run my program the system tray icon appears fine. I set my application be started automatically on windows start up. When I restart the computer my application's process is started but the system tray icon never appears. I think it might b...

Connect with a database over the LAN

How to connect with a database over the LAN? I have only the name of the computer. ...

Is it safe to cast generics in Delphi?

I need to implement a function which returns a TDictionary, without specifying the exact types. The returned value could be a TDictionary<string,Integer>, TDictionary<string,string> or TDictionary<string,Boolean> Could I declare the function with TDictionary as result parameter: function GetMap: TDictionary; and then cast the return ...

How can I fix "Cannot open clipboard: Access Denied" errors?

I am using the following code to copy text to the clipboard: Clipboard.Open; try Clipboard.AsText := GenerateClipboardText; finally Clipboard.Close; end; Seemingly at random I get "Cannot open clipboard: Access Denied" errors. I'm guessing that these errors are caused by other application locking the clipboard, but I n...

Best approach for thread synchronized queue

I have a queue in which I can enqueue different threads, so I can assure two things: Request are processed one by one. Request are processed in the arriving order Second point is important. Otherwise a simple critical section would be enough. I have different groups of requests and only inside a single group these points must be ful...

Querying a TClientDataSet using a TADOQuery

My question is very simple. I have a TClientDataSet that is linked to a TADOQuery via a TDataSetProvider. I can put data into the TClientDataSet from the TADOQuery, but how do I get data from the TClientDataSet back into the TADOQuery? Data is automatically transferred from the TADOQuery to the TClientDataSet when I run a query and then...

"either bof or eof is true or the current record has been deleted.." error on applyupdates that contains a delete operation.

Hello, I am getting this error while resolving delete operation from ClientDatset to TAdoDataset (which bound to access table). I am using Delphi 2010. My DatasetProvider between TClientDataset and TAdoDataset : object dspTarifeler: TDataSetProvider DataSet = DM.qryTarifeler ResolveToDataSet = True Options = [poPropogateChan...

Detect TWebBrowser refresh event in Delphi 2009

Hi, I am using a TWebBrowser component which I use to load XML documents into which are linked to a XSL file. I have a default page I display when no XML document is loaded. However, if the user deletes the XML file whilst it is open in the browser and then refreshes I get the standard resource could not be found error. What I would l...

TImageList component for Delphi 7 Wich supports PNG Images.

Hello, anyone knows a component that descends from TImageList and support PNG images, and compatible with Delphi 7. Thanks in advance. Bye. ...

Consuming a SOAP Rails Webservice doesn't work in Delphi 2009 but was Ok in Delphi 2006

Hi, I have a soap webservice written in RubyOnRails and a client written in Delphi. The client and server comunicate fine using Delphi 2006, but compiling with the newer Delphi 2009 causes the Rails server to "crash". This is the request (generated by built in THTTPRIO): <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http:/...

Application is visible on taskbar?

How to know if a Application is visible on taskbar? I am using Delphi on windows. ...

TEventObject & IE tabs gives fatal error

I am using this code try document := (pDisp as IWebbrowser2).Document AS IHTMLDocument2; Body := Document.body; Links := Document.links; for i := 0 to (Links.length-1) do begin tmp := (Links.item(i, 0) as IHTMLElement); tmp.onclick := TEventObject.Create(MyProcedure) as IDispatch; // THIS LINE end; exce...

Minimize Delphi Application with Live Popup Menu

I'm attempting to run this in a timer: Application.Minimize; ShowWindow( Application.handle, SW_HIDE ); It's been in the code forever and we just discovered that it doesn't work when you have a popupmenu active, it doesn't minimize the MDI parent window. I figure if I can close the popup menu before running this code, then I'll be ok...

Can anyone point me to a AMF library in either Delphi or FreePascal?

I've done a simple search on the usual suspects(Google Code, Source Forge, SO) but did not find any hints of a project for AMF or Flash/Flex remoting. Has anyone stumbled on a project of this nature? ...

Wrong Result after Refresh pressed on DbNavigator Delphi

I have faced a very strange situation here. I am accessing database (MDB) through JET. I use DBGrid and DBNavigator to allow user access it. Dataset is created using TADOQuery component, with the following query: SELECT *, (DateDiff ('y',[Birth Date], Now())) AS [Age] FROM TableName It works fine. But whenever I press Refresh button ...

How do I create an instance from a string that provides the class name?

Recently I found a piece of code that creates an instance of TButton from a string: 'TButton' was used as a parameter. See "Is there a way to instantiate a class by its name in Delphi?" I am trying to save published properties of any object to an XML file (which works fine), and lately I want to recreate these objects from the XML file...

Delphi SDI application - Not handling cascade/tile horizontal & tile vertically?

My application doesn't seem to receive or handle the same windows messages for the Cascade, Tile Horizontal/Tile Vertical on specific windows versions. Windows XP x32 - Not working Windows XP x64 - Not tested Windows Vista x32 - Not working Windows Vista x64 - Works fine?? Windows 7 x32 - Not tested Windows 7 x64 - Not ...

Lyrics flow (Delphi / pseudo-code)

I would like to build a program which lets lyrics of a song run over the screen. Something like this: http://www.youtube.com/watch?v=kIAiBvD9njM Can you help me? Algorithm: pushes the marker to the right of a line fitting the music lets a line above the current line disappear inserts a new line above the current line What is neede...

Install a .bpk into Borland C++ Builder from the command line

I am attempting to install a .bpk package into the Borland C++ Builder 5 IDE from the command line. I am sure that this is possible, as we have some third party components that manage to do so, but I have not been able to figure out the required steps. Any pointers are appreciated! ...

How to run perl script in remote machine from delphi application?

Hi I am working in a delphi application. I need to execute a perl script which is in remote machine in delphi application from local machine. I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the perl script,I just open the putty window, connect to the re...