Jump to content

Search the Community

Showing results for tags 'delphi'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 113 results

  1. John Kouraklis

    Can't deploy to Linux via IDE

    Hi, I've got a CentOS virtual machine and I can connect from the IDE. When I add a simple app and try to run it, I get this error message: [PAClient Error] Error: E0004 File does not exist: C:\Users\[user]\Documents\Embarcadero\Studio\Projects\Linux64\Project1._@emb_.tmp Anyone knows how I might solve this?
  2. https://tondrej.blogspot.com/2019/01/node-modules-with-delphi-and-free-pascal.html chakracore-delphi now comes with NodeSample, a new sample console application showing (as of now very limited) support for Node modules. Included are: - commonmark - graphql - json-query - lodash - moment The sample only shows how Node modules can be resolved and used in Delphi and Free Pascal applications. It doesn't implement Node's event loop or any of its internal modules or native bindings like path, fs or http; any scripts referencing them will - for now - raise an exception. Screencast (YouTube)
  3. Hi Guys, Back in the D2007 days there was a component called ElasitForm which when put on a form automatically scaled the fonts and components as the form was enlarged or shrunk, proportionally, such that the form looked exactly the same whatever size it was changed to by the User. ElastiForm isn't available any more and in any case I suspect, possibly wrongly, that Delphi can do that sort of this in its own right now. Is this correct? If so how? Or is there some trickery still needed? Regards & TIA, Ian
  4. My project is a remote administration tool where i have a same Form in client and server. The form on server side is a "mirror" that is useful to i draw two aligned holes in client side, this Form is centralized according client screen resolution. These holes in client side are made: one in a "locker form" in fullscreen (that have a screenshot of desktop in grayscale) and other made on Form that is the same that have on server (like said above, the "mirror"), the owner of this Form is the "locker form". This explanation above can be better expressed by image attached. Then my trouble here not is to align these holes (in client and server) and yes align the Forms ("mirror" Form of server side and your clone in client side), like you can see on image above, the "mirror" Form (on server side) is showed more to top of screen while your clone (on client side) is showed more below when both are compared. Like you also saw on image above, exists a ScrollBox component on server, then in my tests if i adjust scrolling (manually) to down this can align both Forms ("mirror" Form on server and your clone on client). But will be that exists something that can align automatcally using Delphi code? Code example to better understand this trouble: SERVER SIDE: "Form2" (where is displayed the remote screen in a Image component) => unit Unit2; interface uses Unit3; type TForm2 = class(TForm) Panel1: TPanel; ScrollBox1: TScrollBox; Image1: TImage; private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} // Button1 can stay on Panel1 procedure TForm2.Button1Click(Sender: TObject); begin Form3 := TForm3.Create(Self); Form3.AlphaBlendValue := 127; Form3.Show; end; .DFM: object Panel1: TPanel Left = -1 Top = 0 Width = 773 Height = 89 Anchors = [akTop] BevelEdges = [beLeft, beRight] ParentDoubleBuffered = False TabOrder = 0 end object ScrollBox1: TScrollBox Left = 0 Top = 0 Width = 765 Height = 472 HorzScrollBar.Smooth = True HorzScrollBar.Tracking = True VertScrollBar.Smooth = True VertScrollBar.Tracking = True Align = alClient TabOrder = 1 object Image1: TImage Left = 0 Top = 0 Width = 1362 Height = 621 AutoSize = True end "Form3" (the "mirror Form" semitransparent to be possible see remote screen behind) => unit Unit3; interface uses .. . type TForm3 = class (TForm) procedure FormCreate(Sender: TObject); private { Private declarations } procedure CreateParams(var pr: TCreateParams); override; public { Public declarations } end; var Form3: TForm3; implementation uses Unit1, Unit2; {$R *.dfm} procedure TForm3.FormCreate(Sender: TObject); var MyString: String; Splitted: TArray<String>; begin MyString := Form1.ListView1.Selected.SubItems[6]; // Resolution of remote screen Splitted := MyString.Split(['x']); Left := (Integer(Splitted[0]) - Width) div 2; Top := (Integer(Splitted[1]) - Height) div 2; end; procedure TForm3.CreateParams(var pr: TCreateParams); begin inherited; pr.WndParent := Form2.Handle; pr.ExStyle := pr.ExStyle or WS_EX_TOPMOST or WS_EX_TRANSPARENT; pr.ExStyle := WS_EX_TRANSPARENT or WS_EX_TOPMOST; end; .DFM: object Form3: TForm3 Left = 328 Top = 143 BorderStyle = bsNone ClientHeight = 567 ClientWidth = 526 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False Position = poScreenCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 CLIENT SIDE: "Form2" (Form "locker screen") => unit Unit2; interface uses ... type TForm2 = class(TForm) Image1: TImage; procedure FormShow(Sender: TObject); private { Private declarations } procedure CreateParams(var Params: TCreateParams); override; public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} procedure GetGrayscaleOf(ASrc, AGray: TBitmap); var x, y: Integer; vLineSrc: PRGBTriple; vLineGray: PRGBTriple; vGrayValue: Byte; begin ASrc.PixelFormat := pf24bit; AGray.PixelFormat := pf24bit; AGray.Width := ASrc.Width; AGray.Height := ASrc.Height; for y := 0 to AGray.Height - 1 do begin vLineSrc := ASrc.ScanLine[y]; vLineGray := AGray.ScanLine[y]; for x := 0 to AGray.Width - 1 do begin vGrayValue := Round(0.3 * vLineSrc^.rgbtRed + 0.59 * vLineSrc^.rgbtGreen + 0.11 * vLineSrc^.rgbtBlue); vLineGray^.rgbtRed := vGrayValue; vLineGray^.rgbtGreen := vGrayValue; vLineGray^.rgbtBlue := vGrayValue; Inc(vLineSrc); Inc(vLineGray); end; end; end; procedure ColorGray; var vSrc: TBitmap; vGray: TBitmap; begin if Image1.Picture.Graphic = nil then Exit; vSrc := TBitmap.Create; try vSrc.PixelFormat := pf24bit; vSrc.Width := Image1.Picture.Graphic.Width; vSrc.Height := Image1.Picture.Graphic.Height; vSrc.Canvas.Draw(0, 0, Image1.Picture.Graphic); vGray := TBitmap.Create; try GetGrayscaleOf(vSrc, vGray); Image1.Picture.Graphic := vGray; finally vGray.Free; end; finally vSrc.Free; end; end; function CaptureScreen: TBitmap; var dc: HDC; BMP: TBitmap; cv: TCanvas; begin BMP:= TBitmap.Create; BMP.Width:= Screen.Width; BMP.Height:= Screen.Height; dc:= GetDC(0); cv:= TCanvas.Create; cv.Handle:= dc; BMP.Canvas.CopyRect(Rect(0,0,Screen.Width,Screen.Height), cv,Rect(0,0,Screen.Width,Screen.Height)); Result:= BMP; cv.Free; ReleaseDC(0,dc); end; procedure TForm2.FormShow(Sender: TObject); begin Image1.Picture.Assign(CaptureScreen); ColorGray; end; procedure TForm2.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.WndParent := Application.Handle; Params.ExStyle := Params.ExStyle or WS_EX_TOPMOST or WS_EX_TRANSPARENT; Params.ExStyle := WS_EX_TRANSPARENT or WS_EX_TOPMOST; end; { Properties of Form2: Align => alNone AlphaBlend => True BorderStyle => BsNone WindowState => wsmaximized --------------------------- Image1: Align => alNone AutoSize => True } "Form3" (the same "Form3" of server) => unit Unit3; interface uses ... type TForm3 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } procedure CreateParams(var pr: TCreateParams); override; public { Public declarations } end; var Form3: TForm3; implementation uses Unit2; {$R *.dfm} procedure TForm3.FormCreate(Sender: TObject); begin Left := (GetSystemMetrics(SM_CXSCREEN) - Width) div 2; Top := (GetSystemMetrics(SM_CYSCREEN) - Height) div 2; end; procedure TForm3.CreateParams(var pr: TCreateParams); begin inherited; pr.WndParent := Form2.Handle; end; { Properties of Form3: Align => alNone BorderStyle => BsNone }
  5. Hello. I created a datasnap client-server application. Whenever I re-open the project or make changes in ServerMethods unit, the error occurred when I try to activate the clientdataset in the ClientModule unit. Anyone knows how to solve this issue? Thanks in advance. I have attached the screenshot of the error occurred.
  6. It appears that when using Delphi 10.3 and targeting the latest Android API (26) the following call no longer works: MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW); The exception is raise 'java.lang.UnsupportedOperationException'. This was required when facilitating the handling the opening of an associated file using an <intent-filter> within the AndroidManifest.template.xml. The full code sequence is as follows: // Register the type of intent action that we want to be able to receive. // Note: A corresponding <action> tag must also exist in the <intent-filter> section of AndroidManifest.template.xml. MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW); TMessageManager.DefaultManager.SubscribeToMessage(TMessageReceivedNotification, HandleActivityMessage); I've had the same challenge when running the AndroidIntents project from the supplied Samples. Has anyone else encountered this and managed to solve for it?
  7. ImageEn v8.1.2 has now been released to add support for Delphi/C++Builder 10.3 Rio. ImageEn is a powerful native image display, editing and processing library. Learn more at: www.imageen.com We now have a trial version, which is available via GetIt in the Delphi IDE, or our web site at: www.imageen.com/demos/ There are also 200 pre-compiled demo applications so you can instantly try all our features. Top Five Enhancements 1. Enhanced TImageEnLayerMView with background layer locking and custom hover hints 2. Layer Properties dialog improvements including drawing of Line End shapes in combobox, plus optional image-only display for all combobox captions 3. Polyline layers can be created from a selection 4. All pages can be previewed when printing posters 5. Full localization support for Russian and Dutch languages Complete Change History: www.imageen.com/info/history.html The update is free to all users who purchased a license or extension after 26 Novemeber 2017. You can download at: www.imageen.com/support/downloadrequest.html
  8. Primož Gabrijelčič

    Smart Mobile Studio 3.0.1

    Smart Mobile Studio 3.0.1 is released This is the first release since 3.0. Biggest new feature is TW3LeafletMap, which lets you use OpenStreetMap. As it does not need API keys (like TW3GoogleMaps), it’s really fast and easy to use: Create a project Add a TW3LeafletMap -control on the form Set AutoCreateMap to true on the map control Please see the changelog at the end of this post. Installers Smart Mobile Studio installer Free command-line compiler Portable installation Smart Mobile Studio can also be downloaded with the SmartUpdate utility. Select the MASTER -channel for the official version. Changes since 3.0 RTL EventManager Add procedure AllowDefaultAction, that can be called from OnClick when the default action should happen. For example: To let the virtual keyboard to pop up from OnTouch. Bug fixes Native scrolling was prevented if scrolling was done from an unknown element. Prevent an extra OnClick from being fired on mobile devices. TW3ListView: Bug fix to resizing of items. Bug fixes to GeoLocation. Also update the Geolocation demo. Deprecate PhoneGapAPI’s JGeolocation functions. SmartCL.GeoLocation.pas should be used instead. Fix slider so that OnMouseDown, OnMouseUp and OnMOuseMove can be used. TW3TabControl Tab’s OnShow was sent twice for the first tab SmartCL.RegEx moved to System.RegEx. Also fixed TW3RegEx.Exec to return a proper empty array instead of nil. Bug fix to Chart: TSeriesData.Refresh now also updates the X axis SmartCL.Effects: Properly handle padding and margins while doing effects. Fix to css-files for selected text in TW3Edit and TW3Memo TW3Grid Added TW3ImageColumn Add Alignment-property to TW3ColumnHeader Added a new OnCellControlCreated-event, which fires when a button, toggle, progress bar or image is created. Makes it possible to change properties of the control easily. Added support for OpenStreetMap using the Leaflet library New control: TW3LeafletMap New featured demo: LeafletMap IDE/Compiler Fixed search path compilation issues Relative and absolute paths are working now Compiler is updated when search path is modified in options $I will look for include file in the project folder first $R supports absolute paths, wildcards, folder name extension and ($Libraries) macro Fix exceptions in Search Upgrade to UPX 3.95
  9. I like to write code without warnings and hints issued by the compiler. Today I encountered the following warning: program TestCaseW1010; {$APPTYPE CONSOLE} type TPerson = class Name: string; function ToString(Quote: boolean): string; overload; end; function TPerson.ToString(Quote: boolean): string; begin if Quote then Result := '"' + Name + '"' else Result := Name end; var Person: TPerson; begin Person := TPerson.Create; Person.Name := 'John'; Writeln(Person.ToString); // --> TPerson Writeln(Person.ToString(False)); // --> John Writeln(Person.ToString(True)); // --> "John" Readln; Person.Free; end. The compiler shows W1010 Method 'ToString' hides virtual method of base type 'TObject'. In fact, he does not. Is it a false positive warning, or is it something wrong with my code?
  10. Gnostice Document Studio Delphi version 2018 R2 Build 18.2.2831 released with C++Builder support, new SKUs and more. Highlights in this release: - Marketing name changed to Gnostice Document Studio Delphi. This has no impact on code. - SKUs have been reorganized to cater to popular demands. SKUs based on popular demand. - Essential [$250], Professional [$450], and Ultimate [$600] are the new SKUs. - Essential edition replaces ReportExport edition. Customers of ReportExport edition with an active subscription get a free upgrade to Essential. - Ultimate edition includes all features of Professional + 1 full license of Gnostice StarDocs Document Server Viewer edition. - Support for C++Builder. - PDF rendering enhancements and much more. For the full release notes, please have a look at the following page: https://bit.ly/2vRt2sq To know more about Gnostice Document Studio Delphi, please browse to:https://bit.ly/2nKIeDl https://bit.ly/2nKIeDl To download the trial version, please browse to: https://bit.ly/2zz06Xn Please mail us at support@gnostice.com, if you have any questions. Thank you, The Gnostice DevTools Team https://www.gnostice.com #PDF #Delphi #FireMonkey #DocumentStudio #Windows #macOS #iOS #Android
  11. Wrote up this blog post covering a sample of the client/server/openapi auto generated solution from Auto Tables for RAD Server. http://www.fmxexpress.com/auto-tables-logger-rest-client-and-rad-server-sample-for-delphi-10-2-tokyo-on-android-and-ios/
  12. Hello! I have a day job that I enjoy very much, but I'd be interested in extra, short-term assignments. If you got anything that you can't do for whatever reason, please give me a shout,
  13. Juan C.Cilleruelo

    Which type will hold better a TBCDField value?

    #Delphi, #FMX, #FireDAC. I have a DB Field defined as DECIMAL(15, 3); This produce permanent fields on my program of the type TBCDField. All of this is correct. Sometimes I need to Assign the value of one of this fields to a local or class variable. Which type do you recommend for this variable to assure I do not go to lost precision and the value is going to be near to an unaltered form?