Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/26/23 in all areas

  1. I'm so confused.
  2. It seems someone lost their thread...
  3. Lars Fosdal

    iOS FMX controls not show on Iphone 14 device with ios 16

    Please make a minimal app that reproduce the problem, and create an issue on https://quality.embarcadero.com Remember to give a good step by step description of how/when it fails.
  4. programmerdelphi2k

    IsNullOrWhiteSpace???

    if you see in "source code", you should can ignored this, in better choice! better would be, directly "if LVar.Trim.Length = 0 then ...", no pain, no gain.... no trap!
  5. Attila Kovacs

    IsNullOrWhiteSpace???

    Wow, well, a shitty design.
  6. I believe the difference here is whether you're using VCL -- which is ONLY Windows -- or FMX -- of which Windows is ONE OF MANY target platforms that can be selected. That is, with Windows, you can use EITHER VCL or FMX.
  7. Anders Melander

    bitmap is not displayed

    function WindowProc(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; begin case Msg of WM_DESTROY: begin PostQuitMessage(0); Exit(0); end; else Result := DefWindowProc(hWnd, Msg, wParam, lParam); end; end; procedure RunClient; begin UpdateWindow(LHWND); while (integer(GetMessage(LMsg, LHWND, 0, 0)) > 0) do begin if (LMsg.message = WM_QUIT) then begin PostQuitMessage(0); break; end; TranslateMessage(LMsg); DispatchMessage(LMsg); end; UnregisterClass(PChar(GClassName), LInst); end; The main problem was that GetMessage is declared to return a BOOL but it actually returns an integer. Specifically, it returns -1 when the message queue has been destroyed.
  8. programmerdelphi2k

    Using Bass.dll and add-ons in a Delphi project

    look, using the link above (from site) you can this: the "BASS.PAS" is in "..\bas24\Delphi folder", then, if your project dont have, just add it!!! the "BASS.DLL" is in "..\base24" (32bits) and "..\base24\x64" (64bits) , then, you dont need copy from another place!!! the "DLL" should be where your EXEcutable is it!!! for example, if your EXE is in "c:\myBASSDemo", then, it's here where it should be!!! this files is found https://www.un4seen.com/download.php?bass24 zip downloaded!!!
  9. Stefan Glienke

    [Very unsure] Indy vs sgcIndy

    I love it when people that don't do open source (or at least not that I know - please correct me if I am wrong) try to force people to make their code free and open source.
  10. v5.0.0 Added GPU backend render to TSkAnimatedPaintBox in Vcl; #108 Controls Rewritten Canvas, addressing all pending issues and further enhancing performance; #201 #40 FMX Render Improved performance of TSkAnimatedImage in Vcl; Controls Improved anti-aliasing through multi-sampling; FMX Render Improved library reliability through more unit tests; Tests Fixed numerous minor issues and improved the wrapper as well as the C++ code; API Fixed compilation to Android on RAD Studio Rio; #206 API Fixed issues related to transparency and addressed problems with OpenGL in fullscreen mode on Windows #127; FMX Render Fixed deployment for custom build config; #208 Library Fixed custom font in TSkAnimatedImage; #203 Controls Fixed support for Android 5 and Android 6 broken in last version; Library Deprecated SkParticles since Skia stopped maintaining it at Milestone 112; API Minor improvements. Skia version: 107.2.0 Compatibility break We changed very specific APIs, which are unlikely to generate incompatibilities for developers, but a new major was necessary because we faithfully follow the semantic version. Github: github.com/skia4delphi/skia4delphi Website: skia4delphi.org
  11. You forgot to add an OnKeyUp event handler to reset the direction. procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin case Key of Ord('W'): fdirection := diup; Ord('A'): fDirection := diLeft; Ord('D'): fDirection := diRight; Ord('X'): fDirection := diDown; end; end; procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); begin case Key of Ord('W'), Ord('A'), Ord('D'), Ord('X'): fDirection := diNone; end; end;
  12. programmerdelphi2k

    Beginner to Delphi. Have no idea what I'm doing wrong here

    if key is a char: if Key in ['W','w'] then.... if Lower(key) = 'w' then... if key is a Word: if char(key) in ['W', 'w'] then...
  13. For me this is working with VCL. I set the timer to 250ms. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls; type TDirection = (dinone, diup, didown, dileft, diright); TForm1 = class(TForm) box: TShape; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); private { Private declarations } fDirection: TDirection; public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin case key of ord('W'): fdirection:=diup; ord('A'): fDirection:=diLeft; ord('D'): fDirection:=diRight; ord('X'): fDirection:=diDown; else fDirection:=diNone; end; end; procedure TForm1.Timer1Timer(Sender: TObject); begin case fDirection of diup : box.Top:=box.top-10; didown : box.Top:=box.Top+10; dileft: box.left:=box.Left-10; diright: box.Left:=box.Left+10; end; end; end.
  14. If you are following the tutorial you should start a new project. Select New / Multi-Device Application not Windows VCL Application. In this case the Windows VCL TListBox component does not have the " var KeyChar : char" parameter that the Multi-Device TListBox component has. Many others could be different as well and that would create serious cause of confusion.
  15. Here you go Will. The tutorial is a multi platform application, you started a VCL application, the controls have different parameters.
  16. Try the follow if Key = Ord('w') then Movement := 'down';
×