-
Content Count
2561 -
Joined
-
Last visited
-
Days Won
133
Everything posted by Anders Melander
-
Systemic failing of Embarcadero development and support or am I just paranoid ?
Anders Melander replied to CyberPeter's topic in General Help
And then there's this one about "Code Profiling, Optimization, Performance, and Memory Leaks" (in which the audio worked but the video didn't, so it's two hours of power point) which manages to completely avoid the topic of profiling... -
Ah, I didn't realize who you represented. I'll let you figure it out for yourself then 🙂
-
Are you patching the compiled binaries or are you generating resource modules for use with the RTL's built-in localization system?
-
TImage (JPG) not scaling, but PNG and BMP DO ???
Anders Melander replied to A.M. Hoornweg's topic in VCL
That shouldn't matter. Regardless of the dimensions of the jpeg image, it (or rather the internal TBitmap representing the decoded image) will be stretched to fit the target rect. procedure TJPEGImage.Draw(ACanvas: TCanvas; const Rect: TRect); begin ACanvas.StretchDraw(Rect, Bitmap); end; -
TImage (JPG) not scaling, but PNG and BMP DO ???
Anders Melander replied to A.M. Hoornweg's topic in VCL
Weird indeed. Can you tell if it's the TImage itself or only the content which isn't being scaled? -
TImage (JPG) not scaling, but PNG and BMP DO ???
Anders Melander replied to A.M. Hoornweg's topic in VCL
That's pretty useless - "OT" or not. He's using a TImage. -
Command-line build slower than IDE build
Anders Melander replied to Raphaël's topic in Delphi IDE and APIs
I'm guessing the IDE build is using an internal unit cache when it's building. Try comparing an external build through msbuild with an IDE build where the project is configured to use msbuild (Project->Options->Building->Delphi Compiler->Use MSbuild...) -
Delphi 11.1 IDE - Control + Click doesn't open FireDAC units
Anders Melander replied to Michael Riley's topic in Delphi IDE and APIs
Doesn't the trial come with full source... Asking for a friend 🙂 -
Delphi 11.1 IDE - Control + Click doesn't open FireDAC units
Anders Melander replied to Michael Riley's topic in Delphi IDE and APIs
Okay, if that doesn't resolve the problem I suggest you try using SysInternal's ProcMon to determine what's going on. Filter on bds.exe and enable the trace just before you do a [Ctrl]+[Enter]. -
Delphi 11.1 IDE - Control + Click doesn't open FireDAC units
Anders Melander replied to Michael Riley's topic in Delphi IDE and APIs
Check if $(BDS)\source\data\firedac is in your browsing path: Tools->Options->Language->Delphi->Library->Browsing path. Does the folder exist on disk? If you [Ctrl]+[Enter] on a FireDAC unit in the uses, does that open the file? -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
I meant from their perspective. -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
I don't think it was the environment that turned the forums poisonous. I think it was the almost complete refusal to acknowledge the many problems which alienated a lot of former champions of Delphi (myself included) and made them feel betrayed. Disgruntled fans are often very vocal in their criticism. Anyway, water under the bridge. -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
I remember that incident. Classic Nick. -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
So, "paid" shills. My bad for thinking it was something else. I guess I could have just googled it: https://www.embarcadero.com/embarcadero-mvp-program https://community.embarcadero.com/blogs/entry/are-you-asking-about-mvp-1407 LOL -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Such as? -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Why? I thought it was an honorary title. -
Micro optimization: IN vs OR vs CASE
Anders Melander replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Okay then, here's a comment: If you really cared about performance then you would profile your code and direct your efforts at areas that would make an actual difference on a higher level. -
Modern way to create splash screen from transparent png with edges that blend with the background
Anders Melander replied to CyberPeter's topic in General Help
Source attached. I use this code in most of my open source/freeware tools. Features: Fades image in/out on show/hide. Can be moved with the mouse. Automatically hidden when deactivated. A text can be displayed on top of the image. Text can be scrolled to create vertical banner. Can play a audio resource while visible. Can also be used as an "About box". Things to note: Splash does not "stay on top" when running in the debugger. This is by design. Doesn't handle HighDPI scaling well (image isn't scaled). SplashDemo.zip -
Problem with ClientToScreen() on Multiple Monitors
Anders Melander replied to Steve Maughan's topic in VCL
So place a breakpoint on the call to ScreenToClient and see what's going on. Easy Peasy. -
Problem with ClientToScreen() on Multiple Monitors
Anders Melander replied to Steve Maughan's topic in VCL
So you haven't tried to reproduce the problem with two monitors...? Yes. If you had looked at the source you would have seen that TControl.ClientToScreen calls TControl.GetClientOrigin which ends up calling Winapi.Windows.ClientToScreen(Handle, Result); The ClientToScreen API function returns the coordinates relative to the top left corner of the primary monitor, which is what you'd want. -
Any example bitmap to grayscale?
Anders Melander replied to Michael Collier's topic in Cross-platform
Nooooooooo! No. No. No. NO. Change the pixelformat to pf32bit Desaturate the RGB: (* Rec. 709 (also used by Gimp) *) // Y = 0.21 × R + 0.72 × G + 0.07 × B const LuminanceMultR = 54; LuminanceMultG = 184; LuminanceMultB = 18; function Desaturate(Color: TColor): TColor; var Luminance: byte; begin Luminance := (((Color and $00FF0000) shr 16 * LuminanceMultR) + ((Color and $0000FF00) shr 8 * LuminanceMultG) + ((Color and $000000FF) * LuminanceMultB)) shr 8; Result := (Color and $FF000000) or (Luminance shl 16) or (Luminance shl 8) or Luminance; end; procedure Desaturate(Bitmap: TBitmap); begin ASSERT(Bitmap.PixelFormat = pf32bit); for var Row := 0 to Bitmap.Height-1 do begin var p := PDword(Bitmap.ScanLine[Row]); var Col := Bitmap.Width; while (Col > 0) do begin p^ := Desaturate(p^); inc(p); dec(Col); end; end; end; -
Can someone provide inbound and outbound ports used by IDE?
Anders Melander replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
Better now? -
Delphi 11.1 is available
Anders Melander replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Who needs unicorns and rainbows when we now have awesome user interfaces technologies like this: The possibilities seems endless. . . -
Can someone provide inbound and outbound ports used by IDE?
Anders Melander replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
Bad day? Did someone claim it doesn't work? As far as I can tell he just asked a question.