Jump to content

DelphiUdIT

Members
  • Content Count

    629
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by DelphiUdIT

  1. DelphiUdIT

    How to open form2 then close form1

    Yes, you are right, I expressed myself badly. I meant Main Form. Since he wrote that he was a beginner I implied that Form1 was both the first Form and the main one (it is generally both the first Form and the main one when you create a new project with Delphi). But of course is better to talk with the correct terms.
  2. DelphiUdIT

    How to open form2 then close form1

    Remember, YOUR FIRST FORM should always be alive, don't close, free or release it. If you close your FIRST Form, the application also terminate. In your example, when you'll exit from Form2 your application will close. And it would have closed even if I had used the Show method instead of ShowModal. If you need to "hide" the main Form use the Hide method. For other Forms (not MDI) you can also use the Close method ... as a default action the Form will be hidden (i.e. put in HIDE state). https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Forms.TForm Bye
  3. DelphiUdIT

    Compile&Run cmd for Android

    In the "Project/Deployement" window you can set the files that you don't want overwrite (deploy) ("ovewrite" column options). By default all newer local files will be deployed and overwrite the remote ones. Bye
  4. DelphiUdIT

    Should I just dive in to GUI programs?

    On your question, I think that all other people said a lot. Speaking of console programming, a GUI program is not very different: apart from the graphical interface, many times the logic behind the program is in fact programming that has nothing to do with graphics. Threads, tasks, mathematical processes, data processing are generally algorithms and developments totally detached from the GUI. In these cases, there is not much difference between a console program and a graphical program. The "graphical" part facilitates and simplifies some tasks, which otherwise in a text-only interface would be difficult anyway. I'll give an example that may not be exactly right, but in my opinion it gives the idea: those who know Linux have certainly used the "top" utility which is a totally console program. A comparison in Windows could be the task manager, leaving aside the functional details I would say that using the task manager is more "user friendly" than "top". The background works is nearly the same, presenting all the "applications" with their respective execution peculiarities (occupied memory, CPU usage, process identifier) and the possibility of performing some actions (terminate, suspend, etc ...). For the applications that I develop, the graphic part is necessary, but in fact it is totally disconnected from the 80% of the rest of the application in which I have to perform analysis (between deep learning and classical mathematics), communication logic and process control and management.
  5. DelphiUdIT

    Adding basic AWS S3 operations to Delphi app

    Never do this, but you can try starting from AWS SDK for Delphi 1.1.0 , you find it in GETIT. Bye
  6. DelphiUdIT

    New Code Signing Certificate Recommendations

    I think we are taliking about certificate on hard token like new stardard impose. You cannot have a private key in any way in a file. The last example proposed in the link by Anugs try to use the private key on USB (using a undocumented feature) and a certificate on file (DER format). This doesn't work on Certum. It will always ask for a PIN and if you use the /CSP parameter with undocumented features, it say "the token is not compatible with request operation, try another token".
  7. DelphiUdIT

    New Code Signing Certificate Recommendations

    By now, like I write in another thread, I use Certum (since two days ) and they are compatible with the Windows certificate store. Of course they install they own drivers, but without calling them directly all applications view the certificate and can use it.
  8. DelphiUdIT

    New Code Signing Certificate Recommendations

    For Certum (ACS ACR40T), this doesn't work.
  9. I finally received the EV certificate. It was an exhausting journey, where every day the certification body (Certum) asked me for a document, a clarification or something else. Having to follow the complete path (I had never purchased any certificate from them) they rightly verified everything and even more than everything. The installation of the certificate (keys and certificate itself) on the hardware key was done through their control panel via browser in two stages. Everything worked the first time and the cost was in line with that of direct competitors (at least for the three-year solution). The hardware key is seen directly through the "storage" of Windows certificates and so the certificate is visible and usable by any application. In the Rad Studio IDE I inserted a new Tool (under "tools menu") that allows me to immediately sign the executable file (or DLL) compiled from the project. Now the second step is to verify with Microsoft the pairing for signing the drivers.
  10. TBitMap is Thread Safe since Tokyo release: https://docwiki.embarcadero.com/RADStudio/Tokyo/en/Multi-Threading_for_TBitmap,_TCanvas,_and_TContext3D Of course this doesn't means that it doesnt'use main thread in sync way.
  11. DelphiUdIT

    Uploading photos to a web host.

    Please, post some minimal code. You use TLS ... are you put in the directory of you app the openssl dll (x86 or x64) version 1.0.2u (the last pubblic free version supported by Indy in bundle version of Rad Studio) ? EDIT: I posted here a Demo from Indy with FTP and SSL working. Inside there are the right openssl DLLs 1.0.2u for x64. You can replace them of course if you don't trust. I don't remember if this is the original demo code or I changed it to works with TLS. FTP.zip
  12. DelphiUdIT

    Delphi for Mobile Applications

    I am curious to know the reason why to develop such a large amount of technology in a mobile application. Development environments (SDK Android, IOS, Google, etc ...) are not stable over time and change very quickly based on the release of the OS. This forces continuous maintenance in the code, especially in cases like these (as @Dalija Prasnikar also mentioned) ... Not to mention the hardware resources and all the cons ... I would not say that developing such an application for mobile devices is a wise choice, but surely I'm wrong ...
  13. Hi, I was doing some tests and I came across a strange "behavior". The code here simply performs a division between a random value taken from an array and a constant via an assembler function, and returns the result of the division in integer and the remainder. Program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Diagnostics; //WinApi.Windows, {$IFDEF CPUX64} function DivandMod(Dividendo: UInt32; Divisore: UInt32; var Resto: UInt32): UInt32; overload; asm .noframe mov EAX, ECX mov ECX, EDX xor EDX, EDX div ECX mov DWORD PTR [R8], EDX end; {$ENDIF} const counting = 500_000_000; var i, k: UInt32; t: TStopWatch; a: TArray<UInt32>; resto: UInt32; //risultato: UInt32; //prochandle: THandle; begin // procHandle := GetCurrentProcess; // SetProcessAffinityMask(prochandle, $1); SetLength(a, counting + 1); t := TStopWatch.StartNew; for i := 0 to counting do a[i] := Random(High(Int32)); t.Stop; WriteLn('Load random values:':20, t.ElapsedMilliseconds); for k := 1 to 3 do begin t := TStopWatch.StartNew; for i := 0 to counting do DivandMod(a[i], 2039, resto); // risultato := DivandMod(-12, 7, resto); t.Stop; WriteLn('Test:':20, t.ElapsedMilliseconds); end; writeln(''); writeln('Press any key to close the program'); ReadLn; end. Now the code if compiled with the options "Overflow checking" and "Range checking" (typical of debugging) enabled has the times (in ms.) listed here: If they are disabled I would expect the times to improve, instead they get worse: Does anyone have any idea why? I noticed this because when running the program in RELEASE mode the times increased. I wasted some time trying to understand why, then simply activating or deactivating those options changes occur (this is independent of the DEBUG or RELEASE mode). Try with Windows 11, I9 14900HX , Delphi 12.2 last patch, project build for X64 without optimization and without stack frames.
  14. I can change the two options in DEBUG or RELEASE and the final otput is the same, there are not difference between RELEASE and DEBUG: if I uncheck them in RELEASE the time increased like if I uncheck them in DEBUG. And I'm sure about the "inversion". I think the same. That is really strange, 'cause the instructions executed are the same in either (with or without check) but there are more others with check. And the "processor logic" seems to prefer the long path ....
  15. This is a link for software to initialize the sim card: https://support.certum.eu/en/cert-offer-card-manager/ According to this: I will do it now with my new set ... EDIT: I can confirm that the sim card can be initialize with the software (link provided above) and you can SET your free fantasy PIN and PUK.
  16. But this means that you can use the sim without PIN ? Of course, not maximun security, but certainly a minimal annoyance. I'll have the "kit" this evening and tomorrow I'll see the various options for playing with it.
  17. I bought an EV certificate yesterday from Certum ( @Patrick PREMARTIN talked about it in a previous post) obviously on physical media (USB Reader + SIM). And they confirmed to me that the SIM is "virgin", it will be written with the certificates once it arrives in my possession and after confirmation of the header data. Again, with each update (I will do it after three years) both the public and private key will be lost because everything will be overwritten. Now I await delivery and the subsequent activation processes. I don't know if the "writing" and activation process will be online or if they will send me something.
  18. DelphiUdIT

    Refactor rename field fails always

    You can simply do from IDE (start it with administror privilege): Double click on "Register":
  19. DelphiUdIT

    Refactor rename field fails always

    I start in Delphi using Rad Studio and I missed lots of "voices" of refactoring menu, they are disabled. (CTRl SHITF E) open the search tab (like if you press (CTRL F)). I don't have that exception. My "interop" are inside "bin" folder and there is a TLB file that you can use to register the "type library".
  20. DelphiUdIT

    What is this flashing message doing there?

    To capture the screen you can simply make a video with your smartphone.
  21. DelphiUdIT

    Resizing Object Inspector Pane in 12.2p2

    I have a monitor (laptop) 2560 x 1660 with 100% scale and a secondary monitor FULL HD. I don't have this issue in whatever configuration I set (like @dummzeuch). I can resize the panels and it's working. Bye
  22. DelphiUdIT

    Where is the VC++ option check box

    I have been using it for many years and have never changed it... int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved) {....}
  23. DelphiUdIT

    for loop variable value after the loop

    And where exactly? It would be useful to know...
  24. DelphiUdIT

    for loop variable value after the loop

    Me too thought that. And it's for this that I start using inline variable, sò no one can use the "index" outside the loop. Bye
×