Jump to content

Lajos Juhász

Members
  • Content Count

    828
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Lajos Juhász

  1. Lajos Juhász

    The Delphi 11.2 release thread

    It should be simply a build for every application. So far I have no choice as with every version some bugs are fixed and new are introduced that forces to move to even newer version and hope that (n+1)! will be stable for the applications I am working on. (For me it's easier as application on D11 are still in release candidates. New versions while the stable versions are compiled with XE5.)
  2. Lajos Juhász

    The Delphi 11.2 release thread

    It should be compatible, there are some corner cases where it is not. After update you should recompile everything (bpl+exe) just to be sure.
  3. Lajos Juhász

    KSVC 7.0 Bug component

    I didn't saw this one. On the other hand lately I mostly do debugging and doesn't create a lot of new forms.
  4. Lajos Juhász

    Problem Notification

    It's strange it's closed as duplicate without the number of the other RSP. We don't know what is in the other RSP and its status.
  5. Lajos Juhász

    Application Position & Size

    In this case I would go with Form.CurrentPPI (Every control has a CurrentPPI property).
  6. Lajos Juhász

    Application Position & Size

    It's not a good idea to use Screen.PixelsPerInch, with per-monitor DPI it will not work correctly on multi monitor setup with different dpi.
  7. Lajos Juhász

    Line number of source code at runtime

    I bet that he wants the call stack for exceptions. (Maybe for multi-platform application. I am guessing, that could be a reason to choose fmx forum as it's the multi platform framework).
  8. Lajos Juhász

    post image base64 to whatsapp api

    In the C# everything is a parameter (https://blog.ultramsg.com/send-whatsapp-message-by-whatsapp-api-c-sharp): procedure TForm1.Button6Click(Sender: TObject); var byte1: TBytes; file2: string; base64: TBase64Encoding; begin if OpenDialog1.Execute then begin /// / begin encodein base64 byte1 := System.iOUtils.TFile.ReadAllBytes(OpenDialog1.FileName); base64 := TBase64Encoding.Create(0); // CharsPerLine = 0 means no line breaks try file2 := base64.EncodeBytesToString(byte1); finally base64.Free; end; var Client := TRESTClient.Create('https://api.ultramsg.com/instance16802/messages/image'); var request := TRESTRequest.Create(nil); var esponse := TRESTResponse.Create(nil); request.Client := Client; request.Response := esponse; Client.ContentType := 'application/x-www-form-urlencoded'; request.Method := TRESTRequestMethod.rmpost; request.AddParameter('token', token_txt.text); request.AddParameter('to', send_to_txt.text); request.AddParameter('image', file2); // request.AddBody(LJSONObject); request.Execute; Memo1.Text := request.Response.Content; end; end;
  9. Lajos Juhász

    post image base64 to whatsapp api

    // CharsPerLine = 0 means no line breaks
  10. Lajos Juhász

    post image base64 to whatsapp api

    Why is file2 a widestring? You should try: procedure TForm1.Button1Click(Sender: TObject); var byte1: TBytes; file2: string; LJSONObject: TJSONObject; base64: TBase64Encoding; begin if OpenDialog1.Execute then begin /// / begin encodein base64 byte1 := System.iOUtils.TFile.ReadAllBytes(OpenDialog1.FileName); base64 := TBase64Encoding.Create(0); // CharsPerLine = 0 means no line breaks try file2 := TNetEncoding.base64.EncodeBytesToString(byte1); finally base64.Free; end; var Client := TRESTClient.Create('https://api.ultramsg.com/instance16802/messages/image'); var request := TRESTRequest.Create(nil); var esponse := TRESTResponse.Create(nil); request.Client := Client; request.Response := esponse; Client.ContentType := 'application/x-www-form-urlencoded'; request.Method := TRESTRequestMethod.rmPOST; LJSONObject := TJSONObject.Create(); try LJSONObject.AddPair('token', 'xxxxxx'); LJSONObject.AddPair('to', '+00000000'); LJSONObject.AddPair('image', file2); request.AddBody(LJSONObject); request.Execute; Memo1.Text := request.Response.Content; finally LJSONObject.Free; end; end; end;
  11. Lajos Juhász

    Round

    MyCariable:=trunc(MyCariable*100)/100;
  12. Lajos Juhász

    Android / FMX - To Free or Not To Free (or FreeAndNil)

    This was correct until Delphi 10.4 when ARC ( Automatic Reference Counting) was removed. Now you code the same way on all of the platforms and have to call free or if you must call freeAndNil (freeAndNil is in 99.999999999999999999% a code smell.)
  13. Lajos Juhász

    The Delphi 11.2 release thread

    He also mentioned that there are some corner cases where it's not and he believes that we should not have those cases. Best is to recompile everything.
  14. Lajos Juhász

    DB field update using "DataSet.FieldByName" is not working

    This logic most probably belongs to the field's onchange.
  15. Lajos Juhász

    create a popupmenu from a SQL

    The hotkey doesn't have to be the first character. A better solution is to set the AutoHotkeys property of the popup menu to maManual. If that's not possible you can use the StripHotkey function from Vcl.Menus to remove the &.
  16. Lajos Juhász

    FireDAC component TFDPhysODBCDriverLink missing

    According to the Delphi 11 feature matrix that's a Architect/Enterprise feature. I cannot check out for Delphi 10.4 but believe it's the same.
  17. I quick google search returned this one: https://devblogs.microsoft.com/math-in-office/richedit-font-binding/ I have to warn you that this is a bug in MS Richedit implementation. I've entered into Microsoft Word using Courier New 11 ──────────────────────────────. No problem there, then copied to the clipboard and pasted to Wordpad.exe the result wordpad changed the font to Segoe UI Symbol 11.
  18. Lajos Juhász

    How to synchronize splitters?

    Why not use the OnMoved event of the splitter?
  19. Lajos Juhász

    Move a form a few pixels??

    Do you get burn-in with LCD? While LCDs are not susceptible to burn-in the same way CRT monitors are, LCDs suffer from what manufacturers call image persistence. Like the burn-in on CRTs, image persistence on LCD monitors is caused by the continuous display of static graphics on the screen for extended periods. (I am not going to test this on my monitor)
  20. Lajos Juhász

    Move a form a few pixels??

    I would do something like this: var ws: TWindowState; l: TRect; begin ws:=WindowState; l:=BoundsRect; try if ws=wsMaximized then WindowState:=TWindowState.wsNormal; SetBounds(l.Left+1, l.Top+1, l.Width, l.Height); Repaint; Sleep(100); finally WindowState:=ws; if ws<>TWindowState.wsMaximized then SetBounds(l.Left, l.Top, l.Width, l.Height); repaint; end; end;
  21. It's https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.UTF8Encode.
  22. Lajos Juhász

    Out Of memory

    In this case Fetchoptions doesn't make a difference. in order to do a client side filter the computer has to load all the data and then can filter out the requested records.
  23. Lajos Juhász

    Out Of memory

    Most probably you're loading 1.7GB data into the memory (you can verify using task manager). Insted of a client side filter you should do a server side.
  24. Lajos Juhász

    delphi Twebbrowser Javascript error

    For me it's happening for about a year maybe a bit longer, before that I used the registry entry for years without a problem.
  25. Lajos Juhász

    delphi Twebbrowser Javascript error

    If you really want to use TWebBrowser you must set FEATURE_BROWSER_EMULATION before using the component (Windows is going to remove it from the registry constantly). Of course this is only a short term solution as IE is dead.
×