I have a Delphi 2010 app that imports Windows Media Player via a type library (and thus TOleControl). I assign a TPanel as the parent for the control and this all works fine.
However assigning a TGestureManager etc. to the parent panel does obviously not work but I was wondering if there is some other way to get some "basic" gestures to...
I encountered a strange compiler error in Delphi Prism 2010 that I am unable to resolve. The error is calling a method on an object defined in a third-party assembly that manipulates a specialized image format. The assembly itself was compiled against the .Net 2.0 Runtime.
Despite providing the correct list of parameters, I consistently...
What is the better approach for separating definition and implementation, using interfaces or abstract classes?
I actually I don't like mixing reference counted objects with other objects. I imagine that this can become a nightmare when maintaining large projects.
But sometimes I would need to derive a class from 2 or more classes/in...
Using Delphi 2007 and TMS components for Unicode utils and interface (upgrading to Delphi 2009 for Unicode support is not an option).
I'm storing a list of filenames in a string list (TTntStringList). It's sorted and case insensitive. The default sort routine uses CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, ...) to compare stri...
I have a Delphi form inside a DLL (I know that this restricts the use of the DLL to Delphi but this is not a problem in this case).
The DLL exports a function ShowForm that looks roughly like this:
procedure ShowForm (App : TApplication);
begin
OldApp := Application;
try
Application := App;
MyForm := TMyForm.Create (nil);
...
I wrote this procedure based on integral image algorithm described at this url
http://people.scs.carleton.ca/~roth/iit-publications-iti/docs/gerh-50002.pdf
Is there any way to do this code faster?
Pointers are much faster as dynamic arrays?
procedure TForm1.bBinarizationClick(Sender: TObject);
var
iX1, iY1,
iX2, iY2,
ii, jj,
...
Just discovered something rather funny:
var
Queue : TQueue <TProc>;
MyProc : TProc;
...
MyProc := Queue.Dequeue;
I think you see what is intendend here. However, the compiler thinks I want to store the Queue.Dequeue method (type "procedure of object") in MyProc and reports an error
E2010 Incompatible Types: 'TProc' und 'Procedur...
I need to write a program which will browse through strings of various lengths and select only those which are written using symbols from set defined by me (particularly Japanese letters). Strings will contain words written in different languages (German, French, Arabic, Russian, English etc). Obviously there is huge number of possible c...
Hello,
for my own TCollection descendant I want to extend the collection property editor. I want to see more columns for other properties of my TCollectionItem. And I am a lucky because it is pretty easy. The only thing I want to do was to override these three methods
TAttributeList = class(TOwnedCollection)
private
...
protected
f...
something like Jedi Code format:
//jcf:format=off
.
.
.
//jcf:format=on
...
What does (Sender:TObject) mean??
As in:
procedure TForm1.Button1Click(Sender:TObject);
var
s: Integer;
begin
.....
.....
end;
...
I'm using delphi for years, but never for database stuff, but recently started researching and testing.
I must say, i'm impressed, most of things happens automatically, i'm used to write by hand in php and python.
i'm going to develop a commercial system for a friend, (2 layers) 5 user computers, 1 database server.
Database server wi...
Is possible create (register) a new class in runtime using delphi.
I have a Class called TMyForm, is possible create a new form derived from TMyForm but with new class type.
i want something like this
var
Myform : TMyForm;
MyFormClassBase : TFormClass;
begin
MyFormClassBase := TFormClass(RegisterMyNewClass('TMyNewClass...
I use continuous 5" form (preprinted) with my invoice application and it seems that many matrix printers do not support this 5" form length. Now the key problem is that while printing just one form, two other forms needs to be thrown out as well with linefeed to tear out, since the FF code causes continuous form to be out of sync. I need...
Hi
In a delphi program (running as a service) i need to call some webservices.
The calls works fine if basic Authentications is not requerired. The calls also works fine if Basic Authentication is requerired and username/password is provided (in BeforePost) using:
InternetSetOption(Data, INTERNET_OPTION_USERNAME,...
InternetSetOption(...
Referring to this question, it might be nice to collect links to sites that really help Delphi beginners.
The first answer pointed to Delphi Basics, which is a really nice site.
But there must be more.
So: please contribute to this community wiki question.
--jeroen
...
Hi Guys,
I have an application that uses Rave Reports.
After upgrading from Delphi 2006 to Delphi 2010 some scripts stopped working and gives an
Access violation message
I have a script that looks like this:
OnGetText:
IF (ddvDetailTaxidEventType.AsInteger = 1) THEN
Value := 'TEST ' + ddvDetailTaxidEventType.AsString ;
ELSE...
I would like to prevent scrolling of ADORecordset basing on some condition.
For example it would be convenient to do something like that:
procedure TfrmMain.qryCenyBeforeScroll(DataSet: TDataSet);
begin
if not (condition) then
qryCeny.DoNotScroll; //Just the idea
end;
How to do this?
...
I need to use a class instead of record for VirtualStringTree node.
Should I declare it standard (but in this case - tricky) way like that:
PNode = ^TNode;
TNode = record
obj: TMyObject;
end;
//..
var
fNd: PNode;
begin
fNd:= vstTree.getNodeData(vstTree.AddChild(nil));
fNd.obj:= TMyObject.Create;
//..
or should I use directly TMyOb...
I need to detect when a TAdoConnection component has lost the connection with the server. I've tried using the OnDisconnect event but this only fires when the Close method is called or the Connected property is set to false.
Another option I've tried is using a TTimer and executing a query like this
SELECT 1 RESULT FROM DUAL
in the O...