Jump to content

ULIK

Members
  • Content Count

    82
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by ULIK


  1. Well, I'm not sure if anyone on Embarcadero has really tested the IDE running on a system with multiple monitors and different DPI scaling, especially, if the primary monitor has a different scaling then 96 DPI. There are so many problems (fonts do not scale or scale too large, IDE toolbars getting too large or moving their position, ...)  :classic_blink:

    It can be a hard job (I'm currently trying to make our own application to be per monitor aware and I'm still not finished after 4 weeks) but if they promote the IDE to be support High DPI, it should work at least a little bit better.

    • Like 1

  2. I'm sorry, I had to give up on MMX 15.1. Those heavy scans while starting the IDE makes it too hard to work with. I'm not sure about the cache as starting the IDE again the next day I noticed again such heavy loads as well as on further restarts of IDE. Unfortunately the current project I'm working on depends on a lot of external component packages as well as requires a lot of restarts of IDE over the day.

    So for now I back on 15.0.49 and everything is fine again.


  3. Hello Uwe,

     

    thank you for that major update. I noticed one thing where I do not know, if it is related to the new MMX build or something else:

    - today IDE (11.1)  was not yet started

    - I installed the update to MMX 15.1

    - Then started the IDE

    - Now I noticed a massive slow down when loading all the IDE packages (especially DevExpress) and task manager shows a very heavy load on BDS.exe

    - It completed after some time (2-3 minutes)

    - I closed the IDE

    - a new start now loads much faster (like it was the days before)

     

    It is the first time that I have seen this so could this be related to new build (some preprocessing maybe?)


  4. Hi,

     

    can someone confirm this behavior: When placing the IDE object inspector on a special location tabbed with project, IDE font changes on a dual monitor system with different DPI settings.

     

    Prerequisites:

    - main monitor using 96 DPI  (2560 x 1440)

    - secondary monitor using 144 DPI (3840 x 2160)

    - screen extended on both screens

    - standard desktop is set to 'Standard Layout'

    ( - no other IDE extensions like MMX or GEXperts loaded)

    - Delphi IDE XE 11.1 (DPI aware) running on main monitor : maximized window

     

    Steps to reproduce:

    - load a new VCL app

    - drag the object inspector to 'Project' window and place it left beside the 'Project' tab (see IDE_step_1)

    ide_step_1.thumb.png.1d6c17f169fafcf8aa578e9a1c0ecedc.png

    - save this as desktop 'Standard Layout_1'

    - make this new layout the new standard layout

    - close the project

    - again create a new VCL app

     

    Now see, how the font has changed:

     

    ide_step_2.thumb.png.e3c7da003c6272defbfd6112d326e0b2.png

     

    Using this new standard layout I can reproduce the font change every time by:

     

    - start Delphi IDE

    - create new project (or load existing one)

    - close this project (not the IDE)

    - again load the project

     

    kind regards,

    Ulrich

     


  5. Hi,

     

    I'm not entirely sure that this is really related to MMX but using some MMX Windows I'm able to reproduce:

     

    Prerequisites:

    * place the two desktop definition files from attachment ( Test.zip ) on location for desktop definitions 

    * make sure you have a secondary monitor using a different DPI scaling ( 150%)  right beside your primary monitor  (100%) !

    * Delphi XE11 starts on primary monitor

     

    Steps to reproduce:

    * start IDE

    * select desktop layout 'MMX (No GX)'  and watch bottom window 'Messages'

    * select desktop layout 'MMX Debug (No GX)'

    * again select layout 'MMX (No GX)' and watch bottom window 'Messages': now font size has changed!

     

    MMX_Step1.png.8772072d784bd02ba0cc2d9460dfc813.png  vs. MMX_Step3.png.d358f92e5ced3afd977cc3ee1689ee4f.png

     

    As far as I can tell this happens only when I have the secondary monitor available using a different DPI. The problem gets more worse as some other IDE windows also change their font size and column positions (inspector, GExperts Search result window etc. )

     

    Is someone able to reproduce this behavior? As said, I'm not sure if this is really related to MMX (installed experts: MMX, GEXperts)

     

    kind regards,

    Ulrich


  6. Hi Uwe,

     

    just a very small point: when changing the color theme on DX11 from light to dark, MMX CodeExplorer window does not fully handle this:

    start IDE, load a project and make CodeExplorer window visible. Then change the color theme of IDE:

     

    test_MMX_Theme_Change.thumb.png.84d53671264b5d5e0a67c21ba816bd58.png

     

    I have to restart the IDE to make the upper part dark as well. Nothing important, just noticed it when playing around with new DX11.

     

    kind regards,

    Ulrich


  7. Hi,

     

    when I print an image using GDI+ DrawImage method on a high DPI system (192 DPI), the result differs from what printer is used. Next is my test code:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      DC: HDC;
      gpGraphics: TGPGraphics;
      gpImage: TGPBitmap;
      gpPen: TGPPen;
      nLogPixUI: Integer;
      nLogPx: Integer;
      png: TpngImage;
      rDest: TGPRectF;
      rectImage: TRect;
      rectImage72: TRect;
    begin
      memo1.Clear;
    
      // Just to get some information on the image
      png := TPngImage.Create;
      try
        png.LoadFromFile('image.png');
    
        memo1.Lines.Add(Format('PNG.Width: %d', [png.Width]));
        memo1.Lines.Add(Format('PNG.Height: %d', [png.Height]));
        memo1.Lines.Add(Format('PNG.Res: %d, %d', [png.PixelInformation.PPUnitX, png.PixelInformation.PPUnitY]));
      finally
        png.Free;
      end;
    
    
    
      if PrintDialog1.Execute(Handle) then
      begin
        Printer.BeginDoc;
        try
    
          gpGraphics := TGPGraphics.Create(Printer.Canvas.Handle);
          try
            // let's use pixel
            gpGraphics.SetPageUnit(UnitPixel);
    
            // get device DPI
            DC := gpGraphics.GetHDC;
            try
              nLogPx := GetDeviceCaps(DC, LOGPIXELSX);
              memo1.Lines.Add(Format('Log. Pixel Device: %d', [nLogPx]))
            finally
              gpGraphics.ReleaseHDC(DC);
            end;
    
            // and create an image rectangle based on some MS Ink coordinates
            nLogPixUI := Screen.MonitorFromWindow(Self.Handle).PixelsPerInch;
            memo1.Lines.Add(Format('Log. Pixel Screen: %d', [nLogPixUI]));
    
            // create the image rectangle, based on a 90x90 pixel rectangle  (just for test)
            rectImage.Create(
              MulDiv(10, nLogPx, nLogPixUI),
              MulDiv(10, nLogPx, nLogPixUI),
              MulDiv(100, nLogPx, nLogPixUI),
              MulDiv(100, nLogPx, nLogPixUI)
            );
    
            // center coordinates system on image midpoint
            gpGraphics.TranslateTransform(rectImage.CenterPoint.X, rectImage.CenterPoint.y);
    
            gpPen := TGPPen.Create(ColorRefToARGB(ColorToRGB(clRed)), 1);
            try
              // create a red rectangle around the image
              gpGraphics.DrawRectangle(gpPen, - rectIMage.Width/2, - rectImage.Height/2, rectImage.Width, rectImage.Height);
    
              // load the image
              gpImage := TGPBitmap.Create('image.png', False);
              try
                memo1.Lines.Add(Format('Img.Width: %d', [gpImage.GetWidth]));
                memo1.Lines.Add(Format('Img.Height: %d', [gpImage.GetHeight]));
                memo1.Lines.Add(Format('Img.Res: %f, %f', [gpImage.GetHorizontalResolution, gpImage.GetVerticalResolution]));
    
                // create the destination rectangle for printing based on rectImage
                rDest.X := -rectIMage.Width/2;
                rDest.Y := -rectIMage.Height/2;
                rDEst.Width := rectIMage.Width;
                rDest.Height := rectImage.Height;
    
                gpGraphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);
                gpGraphics.SetSmoothingMode(SmoothingModeHighQuality);
                gpGraphics.DrawImage(gpImage, rDest, 0, 0, gpImage.GetWidth, gpImage.GetHeight, UnitPixel);
    
              finally
                gpImage.Free;
              end;
            finally
              gpPen.Free;
            end;
          finally
            gpGraphics.Free;
          end;
    
    
        finally
          Printer.EndDoc;
        end;
      end;
    end;

    When I run this code against the attached image (see below) on a 96 DPI desktop system, everything is fine when printing on Microsoft PrintToPDF as well as any other installed printer:

     

    expected_output.png.70d318751be855f7facf634a6d36a615.png

     

     

    Next I run the same code on a SurfacePro 7 with 192 DPI.  Now the result differs from used printer:  HP Universal PS as well as SnagIt produce the expected output:

     

    expected_output_192.png.18de96c67d5a110fe5fbae72756f8b82.png

     

    But Microsoft Print to PDF, OneNote for Windows 10 and a HP Laserjet 400 MFP M425dw (607BA1) printer creates a wrong output: rectangle size is fine but content not.

     

    wrong_output_192.png.ed653311e9baa748f3d37cdc831c78cc.png

     

    So the question is: why produces the output on different printers different outputs? It looks like the wrong output includes some scaling between 96 and 192 DPI but DrawImage should be independent of it, when setting source, destination explicitly. Especially why this is printer dependent?

     

    Any ideas, what causes this problem?

     

     

    Thanks,

    Ulrich

     

    forgot to mention: Delphi XE 10.2 Tokyo

     

    used image for printing:

    image.png


  8. Hi!

     

    can anyone confirm this bug (?): Delphi 10.2.3, MMX 15.0.11 Build 2371

     

    - create a new unit

    - type the following class declaration:

     TMyClass = class(TObject)
     private
       FTest: Integer;
     public
       property Test: integer read FTest write FTEst;
     end;

    - now select the property on MMX code explorer and hit Ctrl+E to edit it

     

    Here this results always in this message:

    image.thumb.png.ae6653d34a19a7a5bdf85afd14bffb22.png

     

     

    kind regards,

    Ulrich


  9. There is a very small glitch on 'Add Event' dialog: the header caption of first tab displays the caption of the dialog instead just 'Event' as the other Add ... dialogs would indicate.

     

    NewEventDialog.png.c72836a06d52f6ba324cde4b5aaaec7e.png

    I can't remember if this is related to MMX 15 or has always been there. 

     

     


  10. No sure that I understand you right: adding a new property to a class is not so much uncommon for me (and that's what I did: selecting the new TForm1 object and added a property. Or do you mean that there is MMX internal code doing some strange things?

×