delphi

How to disable Drag/drop TRichEdit or TRzRichEdit

How to block the drag and drop in TRichEdit? delphi code I work with Rich edit and having difficulties on blocking the drag and drop feature specially dragging text from outside the form let say comming from IE to my RichEdit. ...

Recording and saving .wav Files with TMediaPlayer (Delphi 2010)

Hello people, well im really new to the delphi world. Right now im using the TMediaPlayer to record some sound and save those. I made a click event for the record button in the TMediaPlayer which executes a SaveFileDialog. The user should type in some filename he would like to save and then after recording the .wav file he can click on...

Is it safe to pass Delphi const string params across memory manager boundaries?

Subj. I'd like to use strings instead of PChar because that spares me much casting, but if I just do procedure SomeExternalProc(s: string); external SOMEDLL_DLL; and then implement it in some other project with non-shared memory manager: library SeparateDll; procedure SomeExternalProc(s: string); begin //a bla bla bla //code here...

Setting the fontsize of a Paintbox causes OnPaint to be called

I need to write some text to a paintbox, and I do it in the OnPaint event. When I set the fontsize twice in the method, the OnPaint-event is called repeatedly. To see for yourself, try this: Create a new VCL Forms application Place a paintbox on the form Put the following code in the OnPaint-event: procedure TForm1.PaintBox1Paint(S...

target process downloading inteli

Hi, I'm using this code to ...

working with dll ocx in delphi

i´m trying to use 2 a dll (OCX) in my application but when i want to call a function how can i do soo? how can i call this funcion RSDKLib_TLB.IID_IMeasurement.... "TGUID"??? in the dll is IID_IMeasurement: TGUID = '{97E75BE0-AF26-4E4A-B651-C5DDECEC2936}'; or is the approach wrong?? ...

Which is more efficient way to deal with an Array of Records?

What is the more efficient way? FUserRecords[I].CurrentInput:=FUserRecords[I].CurrentInput+typedWords; or var userRec: TUserRec; ... userRec:=FUserRecords[I]; userRec.CurrentInput:=userRec.CurrentInput+typedWords; FUserRecords[I]:=userRec; ...

Can I resize a Delphi array without losing its previous contents?

Hello all, I have a dynamic array. But initially I am not knowing the length of the array. Can I do like first I set the length of it as 1 and then increase length as I needed without lost of previously stored data? I know I can do such task using TList. But I want to know whether I can do it with array or not? ...

How to make Windows' Memo unfocusable or Label height = size of its content?

Hi! How to make simpe Memo to be unfocusable, so if an user will click on it, focus will not be moved to it? or How to make a Label automaticly word wrap if it's text width > width of a label and make it height = height of text * 'visible' lines count? Thanks! ...

Why does the Delphi compiler create a file named 'c' during a build of a specific project?

When I build my project and the main form is open (fairly large, dozens of components of all kind), the build process creates a file named 'c' in the project folder. The file is empty. If I close the main form in the IDE, the build process doesn't create that file. How can I find out what causes this and why does the compiler care which...

How I manage TProgressBar in Delphi with process completed on TImage?

I have one progressbar and an image on my form. Now I am doing some processing on each scanline on image. I wanted to show progress of my process using progressbar. I set the following properties of progressbar : Max = 20 Min = 0 Position = 0 Step = 1 Smooth = False Now my code on buttonclick event is as under : stat := imgmain.Pi...

Imported ActiveX controls are non-visual

I have imported ActiveX controls before and were able to use them same as regular VCL controls. Every now and again I bump into a control that imports fine but doesn't show up at run-time and only show a little block in the designer. The latest one is an ActiveX wrapper for the Scintilla editor and it shows me a grey block 100 pixels wi...

Unicode Woes! Ms-Access 97 migration to Ms-Access 2007

Problem is categorized in two steps: Problem Step 1. Access 97 db containing XML strings that are encoded in UTF-8. The problem boils down to this: the Access 97 db contains XML strings that are encoded in UTF-8. So I created a patch tool for separate conversion for the XML strings from UTF-8 to Unicode. In order to covert UTF8 strin...

Deplhi to .Net format string conversion

I am looking for a library or snippet to convert Date/Time format strings from Delphi to .Net. This is for Delphi version 2007. For example, Delphi 2007 specifies "m" as month, whereas .Net uses "M". However, in Delphi, if the "m" follows an "h", then it represents a minute value. Are any available, or do I have to roll my own? ...

The connection does not timeout while using Indy

I want to download a file from internet and I imagine this should be a simple task. Trying several different approaches I have found that each one has its own drawback. The main issues are: Application freezes until it downloads the file Application freezes forever if the Internet connection is lost/server does not respond. (details...

cant send text(string) from ttcpserver to ttcpclientserver

i have 2 forms 1 for server another for client after droping ttcpserver on server form and setting its localhost property to 127.0.0.1 and localport property to 55555 and Active property to true i wrote a button1(sendtextbutton) onclick event handler: procedure TForm2.Button1Click(Sender: TObject); begin TcpServer1.Sendln('messa...

Reading a unicode string from SQL Server with Delphi 6

Hello, I need to read a nvarchar(max) field from a SQL Server 2008 database using Delphi 6 and ADO. I can handle the unicode text just fine but it seems the ADO component is "preconverting" the string to code page before I even get to have a look at it. I've tried accessing the field as a TBlobField but it gives me the converted ve...

Indy is not working anymore after update

I had all kind of problems with Indy and following someone’s recommendations (at stackoverflow) I have updated to the latest version of Indy - at least this is what I intended to do. Before starting the installation, I have manually deleted all files containing the "indy" word from my Delphi and from registry. Then I have followed the ...

Delphi - register a com server in the ROT

Hi guys, I've created a very small automation object (using delphi 7). It works at all, but I have problem to register it in the running object table so that I can use getActiveOleObject function to retrieve a running instance of the server. The problem is that the Initialize and Destroy events doensn't fire. EDIT: I've just noted tha...

Programatically rotate tiff image (or pdf)

Does anyone know a way of rotating an image (jpg or gif) in a TWebBrowser control (using Delphi) Update The file would be local. Update 2 So I guess the question should be how do I rotate an image or pdf. ...