How do I define a range of floats?
I want to define a percentage type. TPrecent = 0 .. 100; works fine, but I can only assign integers to it an dwoudl also like to assign floats. How can I do that? ...
I want to define a percentage type. TPrecent = 0 .. 100; works fine, but I can only assign integers to it an dwoudl also like to assign floats. How can I do that? ...
Is there an equivalent in Delphi? I've looked over the documentation and can't find anything that would give me the output I want. ...
Many modern applications have irregularly shaped forms. What is the best way to do this in Delphi? Is it possible to do this without using any third party VCLs? ...
In my application (Delphi 2010, OpenGL, windows XP), I need to read back the pixels of variable portions of the framebuffer. The area of interest is input by the user through a selection rectangle (x1, y1, x2, y2). With this coordinates I do this: var pixels : PGLUByte; //pointer to unsigned bytes begin [Transformation of...
I have to execute some code in the context of the main thread. I am using Lazarus + FPC. I receive an event from a thread inside a DLL (shared library if on linux) and my callback function gets called. Note that this function is not a member of any class but a standalone traditional function with a "cdecl" directive attached. I have to ...
I am making my own installer and it's almost complete. The only thing lacking is the sound when installation is complete. Is that a windows API call or I will need to find that audio file and play that from the source code? ...
Hi everyone I have a project with a few apps with a couple of {$DEF aaaaa} and then I use Inno setup to do a installer. To streamline the process it would be great to create a batch file to do the whole thing from A to Z. Hence the need to use the line compiler I never did that in 10+ years of delphi. Given that the help is... well we ...
Hi, It's said that circular dependencies in a Delphi project can significantly slow down the compile time, is there any tool can check circular dependencies for a Delphi project? Thanks! EDIT: The following ICARUS report summary shows it took 32 seconds for a full compilation of 0.8M LOC (Thanks to Alan for the suggestion), I'm wonderi...
I would like to increase the font size of the standard (D2009) Ribbon controls, but I din't find a property to do it. Is it possible to change the font at all? When yes, how? thanks ...
Hi I've noticed that ADO Connections to our FireBird 2.1 Server stays open. The connections are initiated from an Intraweb Application in the UserSession Unit. I use ADOConnection.Connected := False; but that does not seem to close the connection. I've also tried ADOConnection.Close;. Is there a way to ensure that an ADO Connection i...
Possible Duplicate: Online Code Beautifier And Formatter for Delphi or Pascal I've got unreadable Delphi source code. Is there an online service I could use to reformat the code? ...
Given the code below, wich is a very trimmed down version of the actual code, I get the following error: [DCC Error] Unit3.pas(31): E2010 Incompatible types: 'IXList<Unit3.TXList<T>.FindAll.S>' and 'TXList<Unit3.TXList<T>.FindAll.S>' In the FindAll<S> function. I can't really see why since there is no problem with the previous ver...
OK, here is the complete code for the Splashbar.pas, still have three progressbars, as I want to see what they look like before I choose one. It also includes some stuff that's disabled, as I can't get them to work. unit Splashbar; interface uses ExtActns, Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, ...
Hi , When my Tcpclient is working , with this code : TCPClient.Disconnect; TCPClient.Connect; I get "raised exception class EIdAlreadyConnected with message 'Already connected.'." error still (whereas , it has been disconnected before) . So , how can i disconnect it totally ? Thank you ...
I have a raw audio file captured from a camera in the format u-law mono 8KHZ (no wav headers). The problem I am having is that when I try to play back the file, I just seem to get bad noise. I have plugged the raw audio through a program called goldwave, and it is able to playback the file perfectly. I am sure I am just missing something...
How do I enable ribbon buttons which are disabled after clicking the more commands button in a quickaccessbar using Delphi? ...
I have a D2006 app that uses FastMM4 (like, it has "FastMM4" in the start of the uses clause in the DPR file). I know Delphi uses FastMM4 as it's memory manager anyway, but the downloaded version has more debug dump options. I recently tried to run the app on a single-board tablet type industrial PC running Windows XP embedded. The pr...
Hi there, sorry for this little bit strange title, didn't found a better one.. I've got the following situation: I have a PC with an RFID reader connected via USB. I now need a program which pops up when ab transponder was scanned the the RFID reader and shows the scanned value. (The reader just simulates keystrokes) Problem: the value ...
Hello, I have a Delphi 7 (not 2007) application (lets call it App1.exe) that the IDE thinks is a GUI application but in the DPR, a compiler directive that makes it in to a console application. Example: {$IFDE MAKE_CONSOLE} {$APPTYPE CONSOLE} {$ENDIF MAKE_CONSOLE} During the build process, MAKE_CONSOLE might be defined. The problem...
I am using a TMemo to hold received characters from a serial port for viewing. As they arrive I am doing: Memo1.Text := Memo1.Text + sReceivedChars; This works fine but I presume it is rather inefficient, having to get the existing text before concatenating my few characters and then writing it back. I would really like a 'SendChars()...