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.
...
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...
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...
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...
Hi, I'm using this code to
...
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??
...
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;
...
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?
...
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!
...
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...
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...
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...
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...
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?
...
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...
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...
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...
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 ...
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...
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.
...