Jump to content

David P

Members
  • Content Count

    45
  • Joined

  • Last visited

Posts posted by David P


  1. For those that may be searching for this in the future:

     

    You need to assemble a URL and display it as a QR code so it can be scanned by an authenticator application.  The format is given here:

     

                    https://github.com/google/google-authenticator/wiki/Key-Uri-Format   

     

    I use this string and substitue in my values.

     

       otpauth://totp/[COMPANY]:[ACCOUNT]?secret=[SECRET]&issuer=[ISSUER]&algorithm=[ALGO]&digits=[DIGITS]&period=[PERIOD]

     

    You then display it as a QR code for the user to add to their authenticator application.  I found that whatever time period I entered into the URL(30sec, 60sec etc), the authenticator applications always defaulted to 30 seconds.  This means your TOTP checking code also needs to use a 30s window.


  2. Hello Roger

     

    We have a copy of RADStudio so it was an easy job to compile any Delphi components.

     

    For the components where we have the source (Delphi or C++), we needed to add an additional 'Target Platform' of   'Windows 64-Bit (Modern) '.  Using the macro $(Platform) in the output path will create a \Win64x output directory.

     

    For those Delphi components for which we do not have source code, we'll just have to wait for an update from the vendors.

     

     

    • Like 1

  3. Both 11.3 and 12.1 have that 'else' in place and both enforce the MinWidth setting.

     

    It is possible to drag to a smaller width than MinWidth but upon release it springs to MinWidth width.  I'm now wondering if I was just fixating on the dragging and not when the mouse was released.


  4. I submitted this as a bug and they could not reproduce it in 11.3. Now, neither can I.  I can reduce the column width to below MinWidth but as soon as I release the mouse button it springs back to MinWidth.  I'm  starting to doubt my sanity.


  5. Thanks. I'm using CB 11.3

     

    In the interim I thought I'd detect the column widths changing and then enforce the min width, but there doesn't appear to be any event that fires when a colmn has changed size.

     

    Never mind, found a solution you wrote in 2012.


  6. 12 hours ago, Vincent Parrett said:

    because a usb device can only be used by one machine at a time. Virtualhere presents the device on the remote machine as though it were local. 

    Thanks. Any idea on the lifetime of a connection/use for a code signing cert?


  7. I'm having difficulty saving and restoring column sizes when the user has their Windows Scale and Layout Scale value set to 125% (i.e larger fonts).

     

    With 100% font scaling, I can set and save the column widths without issue.  If I set a column at 100pix and the user does not change the width, then it will still be 100pix when I save the column widths.

     

    With 125% font scaling, setting the column widths at 100, will result in a width of 125 when it comes to saving the  column width.  Using the Form's GetPixelsPerInch function I can save the 'base' width value.

     

    The issue I'm having is that adding an Image to the column header to denote that the list view is sorted using that column also appears to add in a further offset when it's time to save the column widths.  This is only the case with non-100% font scaling.

     

    Has anyone handled this to obtain the base width without scale or image offsets?


  8. Thanks for your reply (I've been on holiday).

     

    I followed your line of reasoning and was able to determine for my vertical TScrollBox:

     

    Child.Top - setting this has no effect on positioning in the TScrollBox

     

    If Align = alNone, all child windows will overlap at the top of the TScrollBox

     

    TScrollBox seems to purely use Child.Align to place windows.

     

    I was able to make this work by using:

     

    Child.Parent = MyScrollBox

    Child.Align = alBottom

    Child.Show( )

    Child.Align = alTop

     

    New entries will now appear at the bottom of the stack.

     

     

     


  9. Yes, I calculate the height of the current contents, then set NewChild.Top = HeightofCurrentContents + 50, so the Top should be below everything currently contained in the scrollbox.  Similar to:

     

    NewChild.Top = HeightofCurrentContents + 50;

    NewChild.Parent = myScrollbox;

    NewChild.Align = alTop;

    NewChild.Show();

     

    This has worked for ~20 years, but with the same code, stopped working a few months back. The only thing I can think changed was upgrading to 11.3 gtom 11.2


  10. For our application, we used to add new items to the bottom of the scrollbox so they're in chronologcal order (top=oldest). We were able to do this by setting all the child forms with Align=alTop and Top to be further down the screen.  This worked. Random child forms could be destroyed and the contents would shuffle up, retaining their order.

     

    Possibly with the introduciton of 11.3, this changed.  No matter what I now do, items are always inserted at the top.  I don't want to have recreate all the contents of the scrollbox to get my desired order as a user may be interacting with a child form higher up in the scroll box.

     

    Does anyone know how to add items to the bottom of a scroll box?

     

    Thanks

     

    David


  11. In my experience:

     

    Clang produces faster code

    Classic is faster to compile

    Clang gives better warnings/error messages.

    Clang is more standards compliant I believe.

    Clang is the future for BCB

     

    Compilation speed: Use either Twine Compile, or use Clang Batch compilation to improve compilation speed.

     

    Making our code compile using clang was fairly simple as the warnings/errors given are very helpful.


  12. From the above thread, your comment:

    >> The variable is defined in the base configuration, so it is safe to use it in the inherited ones, but fails when used inside the base configuration itself.

     

    Gives the solution.  Do not define the output paths in

          Target - All Configuraitons

    but in

        Target - Debug Configuration - All Platforms  / Release Configuration - All Platforms

     

    then it works . 

     

×