I'm writing a multi-threaded application in Delphi and need to use something to protect shared resources.
In C# I'd use the "lock" keyword:
private someMethod() {
lock(mySharedObj) {
//...do something with mySharedObj
}
}
In Delphi I couldn't find anything similar, I found just TThread.Synchronize(someMethod) method, ...
I am failing to connect to SQL Azure using Delphi 2010 and dbGo. What is wrong and how to resolve that ?
The details:
The TADOConnection with the following connection string (the login info is changed):
Provider=SQLNCLI10.1;Integrated Security="";Persist Security Info=False;User ID=me@tyasdgerj5;Initial Catalog=Northwind;Data Source=t...
Hi Folks,
How to determine if a cell is in the view port of a Virtual treeview? Thanks.
...
I'm having a weird issue with an old Delphi app losing it's database connection. Actually, I think it's losing something else that then makes the connection either drop or be unusable. The app is written in Delphi 6 and uses the Direct Oracle Access component (v4.0.7.1) to connect to an Oracle 9i database. The app runs as a service an...
Hi,
I have a Delphi dll defined like this:
TMPData = record
Lastname, Firstname: array[0..40] of char;
Birthday: TDateTime;
Pid: array[0..16] of char;
Title: array[0..20] of char;
Female: Boolean;
Street: array[0..40] of char;
ZipCode: array[0..10] of char;
City: array[0..40] of char;
Phone, Fax, Department, Company: array[0.....
my single threaded delphi 2009 app (not quite yet complete) has started to have a problem with Application.ProcessMessages hanging. my app has a TTimer object that fires every 100 ms to poll an external device. i use Application.ProcessMessages to update the screen when something changes so the app is still responsive.
one of these ...
This should be simple, and I was hoping to do it in Delphi.
The purpose of this is just supposed to be a joke.
On a windows form application I don't want the user to be able to click the X button on the main form. I want the cursor to either clip around the X button or just set it's position elsewhere.
...
Hello all...
I am working with delphi, I want a list of all files of a directory when I execute openpicturedialog.
i.e., When open dialog is executed and
i select one file from it, I want the
list of all files from the directory
of selected file.
You can even suggest me for getting directory name from FileName property...
hi,
Is there any way to manually track the changes done to a clientdataset's delta and update the changes manually on to then db. i have dynamically created a clientdataset and with out a provider i am able to load it with a tquery, now user will do some insert update and delete operations on the data available in the cds, and at final...
hi,
I have created a dynamic TClientDataSet component and tried to fire the OnCalcFields event....it has'nt worked. The code looks like this...
table := TClientDataset.Create(Application);
table.OnCalcFields := tableCalcFields; //where 'tablecalcfields' is the method defined by me.
table.FieldDefs := Query1.FieldDefs;
table.Crea...
Hello All,
I am working with delphi. I have TImage, to which I assign a bitmap.
imgmain.Picture.Bitmap := bmpMain;
imgmain.Picture.Bitmap.PixelFormat := pf24bit;
imgmain is object of TImage and bmpMain is object of TBitmap
I want to zoom my image. I have one trackbar on my form and as I click on trackbar the image should get zoom...
Recently I met a strange problem, see code snips as below:
var
sqlCommand: string;
connection: TADOConnection;
qry: TADOQuery;
begin
connection := TADOConnection.Create(nil);
try
connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False';
connection.Open();
qr...
I am developing a listview baised on the shell. When trying to extract a shell icon/image... I try to extract thumbnail using IExtractImage if that fail I try to extract icons using IExtractIcon, to get maximum iconsize, but IExtractIcon gives strange results. Problem is I tried to use a methode that extracts icons from an imagelist but ...
First of all: this is not a duplicate of http://stackoverflow.com/questions/1021490/delphi-and-sapi. I have a specific problem with the "SAPI in Delphi" subject.
I have used the excellent Import Type-Library guide in Delphi 2009 to get a TSpVoice component in the component palette. This works great. With
var
SpVoice: TSpVoice;
I c...
Hello TO All:
I saw the Example of Mr. Bob regarding Delphi 2010 Datasnap, I am impressed. But my question is what if the client is connected thru proxy server? how could I define the proxy in the client?
thanks...
...
hello
i'm having a problem, i try to solve it since yesterday but no luck.
i have 32 bit delphi dll which i want to import in .NET Win Application. this application has to be built on ANY CPU mode. of course, there's BadImageFormatException coming, which means that in x64 application can't be loaded x86 dll..
i googled around and find ...
I am using WMSysCommand messages to modify Caption bar button ( Maximize / Minimize ) behaivor and recent update requiered to use WMNCHitTest, but I do not want to split these two related messages in multiplie procedures because of lengthy code.
Can I access private declaration ( message ) from other message? And if I can - How to do it...
Is "Replacing non-visual components with code" a proven optimization technique in Delphi 7. Mainly with respect to Database Access.
...
I have an application loading CAD data (Custom format), either from the local filesystem specifing an absolute path to a drawing or from a database.
Database access is realized through a library function taking the drawings identifier as a parameter.
the identifiers have a format like ABC 01234T56-T, while my paths a typical windows P...
I've been having some trouble with one of my Delphi 2010 projects lately. It seems that sometimes, when I have a form open as a modal dialog, the app stops showing up in the ALT-TAB list until I close the dialog. It's still in the Taskbar, but not in ALT-TAB, which means I can't switch to it without using the mouse.
Running under Wind...