Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/14/23 in all areas

  1. Anders Melander

    Applying hue change to font graphic on the fly

    Apart from this line... Result := TColor32(Integer(Result) + (aDiff.RAdj * $10000) + (aDiff.GAdj * $100) + (aDiff.BAdj)); ...it looks ok. The above doesn't take overflow in the individual color components into account so I'm guessing that what's happening is that the overflow causes the alpha to overflow from 255 to 0 (or some very small value). Do this instead: Result := HSVToRGB(H, S, V, TColor32Entry(aBase).A); TColor32Entry(Result).R := Max(255, TColor32Entry(Result).R + aDiff.RAdj); TColor32Entry(Result).G := Max(255, TColor32Entry(Result).G + aDiff.GAdj); TColor32Entry(Result).B := Max(255, TColor32Entry(Result).B + aDiff.BAdj);
  2. Giorgi Chapidze

    Set pipeline between UI and cmd.exe

    I have read the relevant part of the DOSCommand source code, and I was able to complete the project. The DOSCommand library is fairly simple and straightforward. Anyway, I will challenge myself and try to accomplish it without a third-party library. @Der schöne Günther Thanks! I will let you know!
  3. Zoran Bonuš

    Set pipeline between UI and cmd.exe

    For a similar task I use this solution (the updated version), works fine by me: https://stackoverflow.com/questions/9119999/getting-output-from-a-shell-dos-app-into-a-delphi-app
  4. Der schöne Günther

    Set pipeline between UI and cmd.exe

    A ready to use solution (which I have never tried) is TurboPack/DOSCommand: This component let you execute a dos program (exe, com or batch file) and catch the ouput in order to put it in a memo or in a listbox. (github.com) It is said to be available throught "GetIt" as well. For myself, I did it as also suggested by this fine gentleman here For the processes I spawn myself (via CreateProcess()), I just create two pipes and then use WriteFile(..) and ReadFile(..) on them. It is important that CreateProcess(..) has its "inherit handles" parameter to true. If you're stuck, I might post my solution, but it contains a a lot of noise as well (such as moving the created process to a "job object" to allow easier resource scheduling or termination)
  5. Der schöne Günther

    Set pipeline between UI and cmd.exe

    There is plenty of examples on how to do this with Delphi, you already got the correct term: It's (inter-process) communication (IPC) via "pipes". I'd recommend to start a bit more humble by making a small console app by yourself that will, for example, take two numbers from the input, and return the sum of these two numbers. Then, try sending these two numbers to your console app and getting the result back. If that works, you can do that with your free pascal compiler. By the way: Cmd.exe is nothing more than a front-end that just does what your application wants to do. You don't need to "connect" to a cmd.exe. You will directly launch and communicate with your free pascal compiler.
  6. Der schöne Günther

    Working with PDF files??

    Why don't you just use a WebView to display the PDF? It can enable/disable zoom by gestures/touch/hotkeys, and set the general zoom level, but I think it cannot zoom in on a specific part of the PDF, like you can with two fingers on a touchscreen.
  7. Sriram

    IBX & FireDAC, Change Views

    For InterBase Change Views use with IBX (InterBase Express), I am told you can use the following to get the change state of each field in your dataset. Get the change state using the function https://docwiki.embarcadero.com/Libraries/Alexandria/en/IBX.IBSQL.TIBXSQLVAR.ChangeState https://docwiki.embarcadero.com/Libraries/Alexandria/en/IBX.IBSQL.TIBChangeState has various possible change states defined. for e.g. for fld in Dataset.Fields do a[fld.FieldNo - 1] := ChangeState(fld);
  8. programmerdelphi2k

    IBX & FireDAC, Change Views

    in FireDAC you can try see the "Delta" property: https://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Comp.DataSet.TFDDataSet.Delta
  9. The downside of deleting the .dproj file. Output path, search path, dcu output path, and EurekaLog needs to be reconfigured. Oh, such joy.
×