Search the Community
Showing results for tags 'vcl'.
Found 85 results
-
New LMD 2024.6 installer (including Delphi/C++Buillder/RAD Studio 12 Athens support) are available now. This very complete VCL package includes more than 760 VCL components including popular packages like LMD DockingPack, GridPack or LMD DialogPack (available for Delphi/C++Builder XE2 and better). In addition to various bug fixes, the most important new feature of this minor release is: Experimental support for the new Win64x platform in RAD Studio 12 (only new installer technology and precompiled versions. Source code version already supports modern C++ projects). Please note: RAD Studio 12.1 is minimum requirement. The most important changes in the 2024 release are the introduction of our new Universal Installer technology and the extensive improvements to the NG packages. In particular, the HTMLPack has been completely redesigned and contains a large number of new components that fully reflect the functionality of the discontinued TextPack. The new NG DemoCenter has also been introduced for the NG packs, which now contains all demos for the NG components centrally (except for the NG ConnectionPack). As for the installers, installers based on the old technology will be provided for a limited time (in case there are problems with the new variants). A list of all changes can be found on LMD VCL What’s new page. Check the new trials and compiled Exe-Demos at https://www.lmd.de/downloads Feature Matrix of all LMD VCL products: https://www.lmd.de/feature-matrix If you are interested in purchasing check out the order Page: https://www.lmd.de/shopping
-
Hello everybody, i am wondering if a Control can have a specific EventHandler. I mean the following: If a Control has a certain "Event", i can implement an Event Handler for the Form which holds the Control. I wonder if it possible to implement the Event handler as a method of the Component class and thus, the Event is handled by each instance of this component on any Form i use this Component class on (without implementing an event handler on every Form for every Instance, hope it is possible to understand what i am aiming at.) I have never seen such thing. If this is possible, can someone maybe advise me an example how this can be done? Thanks a lot and kind regards, UCT
- 5 replies
-
- vcl
- component classes
-
(and 2 more)
Tagged with:
-
sale 40% Summer sale on NextGrid, DBGrid, Inspector ends soon!
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We are offering an excelent opportunity to get 40% off on our Next Suite Delphi (VCL) Components. Just use SUMMER24 coupon code on the checkout page to get 40% off. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip BergSoft Home Page: bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net -- BergSoft Facebook page -
Hello everybody, i am wondering if there is a property to control the appearance of TreeView Grid-lines in the VCL. The TTreeView Component has some properties like "LineMode" and "LineStyle", as well some "Colors" properties, but all these don't seem to affect the instance i want to change. Is there maybe some property that "disables/overrides" Color and Line settings? I am using C++ builder, Embarcadero® RAD Studio 11 (hoping this is enough info) Thank you very much in advance and kind regards, Ulrich
-
Specs: Delphi XE7, VCL, Windows 7 - DBGrid and added a checkbox column to it I've searched around the web for ideas and howtos. Well, I came across a few resources and met with some success. I've even added/included an additional feature to allow user (that's me) to add edit checkbox via keyboard space. It works. https://www.thoughtco.com/place-a-checkbox-into-dbgrid-4077440 https://stackoverflow.com/questions/9019819/checkbox-in-a-dbgrid I copy/pasted the code from the second link, then I added the code to allow checkbox column updates via the keyboard space (spacebar) from the first link, and ported to the code from the second link. I hope that made sense. <-- My first "codesnippet" contribution to the community !! However, there appears to be one small problem. The checkbox column is showing the text: True or False, whichever is set to., and you can see the outline of the column box when that field is entered into. Complete source code is included below. Just add a (dbgrid, button, tfdmemtable, and datasource) to your forum, and be sure to double-click the event(s) for each of these Procedures in order to activate them. You can click the ch field or hit the spacebar to update the checkbox field. Is there any way I can resolve this artifact? unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, Data.DB, FireDAC.Comp.Client, Vcl.Grids, Vcl.DBGrids, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Comp.DataSet, FireDAC.VCLUI.Wait, FireDAC.Comp.UI; type TForm1 = class(TForm) Panel1: TPanel; Button1: TButton; eb1: TEdit; conn: TFDConnection; btnInsert: TButton; DBGrid1: TDBGrid; ds: TDataSource; mytable: TFDMemTable; procedure Button1Click(Sender: TObject); procedure btnInsertClick(Sender: TObject); procedure dbgrid1CellClick(Column: TColumn); procedure DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); procedure DBGrid1ColEnter(Sender: TObject); procedure DBGrid1ColExit(Sender: TObject); procedure DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormCreate(Sender: TObject); procedure DBGrid1KeyPress(Sender: TObject; var Key: Char); private { Private declarations } GridOriginalOptions : TDBGridOptions; public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.btnInsertClick(Sender: TObject); begin myTable.FieldDefs.Clear; mytable.FieldDefs.Add('ch', ftBoolean, 0,false); // the checkbox 'ch' a boolean myTable.FieldDefs.Add('id', ftAutoInc, 0,False); myTable.FieldDefs.Add('name',ftString, 20,False); myTable.CreateDataSet; myTable.Append; myTable.FieldByName('name').AsString := 'delphi'; myTable.Post; mytable.Open; end; procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); const CtrlState: array[Boolean] of integer = (DFCS_BUTTONCHECK, DFCS_BUTTONCHECK or DFCS_CHECKED) ; begin if (Column.Field.DataType=ftBoolean) then begin DBGrid1.Canvas.FillRect(Rect) ; if (VarIsNull(Column.Field.Value)) then DrawFrameControl(DBGrid1.Canvas.Handle,Rect, DFC_BUTTON, DFCS_BUTTONCHECK or DFCS_INACTIVE) else DrawFrameControl(DBGrid1.Canvas.Handle,Rect, DFC_BUTTON, CtrlState[Column.Field.AsBoolean]); end; end; procedure TForm1.DBGrid1ColEnter(Sender: TObject); begin if Self.DBGrid1.SelectedField.DataType = ftBoolean then begin Self.GridOriginalOptions := Self.DBGrid1.Options; Self.DBGrid1.Options := Self.DBGrid1.Options - [dgEditing]; end; end; procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if ((Self.DBGrid1.SelectedField.DataType = ftBoolean) and (key = VK_SPACE)) then begin Self.DBGrid1.DataSource.DataSet.Edit; Self.DBGrid1.SelectedField.Value:= not Self.DBGrid1.SelectedField.AsBoolean; Self.DBGrid1.DataSource.DataSet.Post; end; end; // this portion of code snippet is my contribution to the community. I did not see this code anywhere. it does work. procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char); begin if (key = ' ') then begin self.DBGrid1.DataSource.DataSet.Edit; self.DBGrid1.SelectedField.Value := not self.DBGrid1.Fields[0].AsBoolean; self.DBGrid1.DataSource.DataSet.Post; end; end; procedure TForm1.FormCreate(Sender: TObject); begin GridOriginalOptions := DBGrid1.Options end; procedure TForm1.DBGrid1ColExit(Sender: TObject); begin if Self.DBGrid1.SelectedField.DataType = ftBoolean then Self.DBGrid1.Options := Self.GridOriginalOptions; end; procedure TForm1.dbgrid1CellClick(Column: TColumn); begin if (Column.Field.DataType=ftBoolean) then begin Column.Grid.DataSource.DataSet.Edit; Column.Field.Value:= not Column.Field.AsBoolean; Column.Grid.DataSource.DataSet.Post; end; end; end.
- 4 replies
-
- delphi xe7
- vcl
- (and 4 more)
-
Hello, when resizing or minimizing and maximizing VCL application the exception is thrown: First chance exception at $00007FFF326DBA99. Exception class EInvalidOperation with message 'Canvas does not allow drawing'. Call stack shows exception is thrown in Vcl::Graphics::TCanvas::RequiredState(System::Set<Vcl::Graphics::TCanvasStates, (Vcl::Graphics::TCanvasStates)0, (Vcl::Graphics::TCanvasStates)3>)() - see attached call stack text file. Best regards. Call stack.txt
-
ann 40% discount on Grid, DBGrid, ObjectInspector and more 🏖
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We are offering an excelent opportunity to get 40% off on our Next Suite Delphi (VCL) Components. Just use SUMMER24 coupon code on the checkout page to get 45% off. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip BergSoft Home Page: bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net -- BergSoft Facebook page -
Website: github.com/viniciusfbb/skia4delphi Skia4Delphi is a cross-platform 2D graphics API for Delphi based on Google's Skia Graphics Library (skia.org). Google's Skia Graphics Library serves as the graphics engine for Google Chrome and Chrome OS, Android, Flutter, Xamarin, Mozilla Firefox and Firefox OS, and many other products. Skia provides a more robust Canvas, being very fast and very stable, with hundreds of features for drawing 2D graphics, in addition to a text shaping engine designed to render texts in the most diverse languages with right-to-left support (such as the Persian language), full support for loading SVG files, support for creating PDF files, support for rendering Lottie files (verotized animations created in Adobe After Effects), integration with the GPU, among countless other cool features. Skia's idea is similar to Firemonkey's, the same codebase used in an OS will work the same on other platforms. It is also possible to design using the CPU in independent background threads. Skia also has native codecs, of course if you don't use the SKCodec class, when loading an encoded image it will give priority to using the platform's native codec, but it is possible to use its codec, for example for jpeg files it uses libjpeg-turbo and for png files libpng which maybe in certain environments may perform better than native. See some examples: Advanced shapes Advanced text rendering / shaping Svg Lottie files And much more...
-
Hello. I'm workin with Delphi 10.4.2 community in Windows 10/11. I've this procedure procedure TfrmMain.AddLog(NomeProc, PointProc, Datis: string; MarckEX: boolean); var ErrorLogFileName : string; ErrorFile : TextFile; markec : string; begin ErrorLogFileName := ExtractFilePath(ParamStr(0))+'error.log'; AssignFile(ErrorFile, ErrorLogFileName) ; if FileExists(ErrorLogFileName) then Append(ErrorFile) else Rewrite(ErrorFile) ; try if MarckEX then begin markec := '***;'; end else begin markec := '---;' end; ErrorData := DateTimeToStr(Now) + ';' + NomeProc + ';' + PointProc + ';' + Datis + ';' + markec; WriteLn(ErrorFile,ErrorData) ; finally CloseFile(ErrorFile) end; end; And I've this Task (simple method to work in another thread) called in a button click TASK := TTask.Create( procedure begin //do some work and then.... call AddLog.. AddLog('Test','Test','Test',false); end ); TASK.Start(); If I call AddLog into TASK do not work. I tried to call AddLog in and out to TASK := TTask.Create( procedure begin //do some work and then.... call AddLog.. TThread.Synchronize(nil, procedure begin AddLog('Test','Test','Test',false); end ); end ); TASK.Start(); but without success, nothing is ever written to the file. What am I doing wrong?
-
blackfriday ANN: New version of NextSuite6 (Grid, DBGrid…) and 50% discount 🎁
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. This update brings support for Delphi 12 and C++ Builder 12 Athens. BlackFriday 50% discount is also active now! Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too. -
I have a question in regards to the new SKI support. When I 'enabled' SKIA in the IDE there was no noticeable change to the project or settings that I found. I could 'disable' it on the IDE as well. What I finally noticed was in the executable folder there was now a sk4d.dll. If I move the file out of that directory the application still ran. (I was expecting some sort of load error (?)).. My question- so even though the application is self contained otherwise - the 32 bit or 64 bit sk4d.dll file needs now to be deployed also? Thanks in advance
-
Is it just my delphi applications that behave poorly when handling dpi changes? This is when setting high dpi in the manifest to PerMonitorV2. I have verified that the controls (many of them mine) are handling this as they should (override ChangeScale). When dragging the application between monitors with different dpi's, it takes 3-4 seconds while the window flickers and repaints multiple times - the dragging operation pauses while it does this, and then the window eventually jumps to where you actually dragged it. I've been looking at other applications (that ssupport PerMonitorV2) to see how they behave, even explorer stutters a little, due I guess to the ribbon control - but the stutter is around the 200ms mark. Thunderbird seem to repaint twice but very fast. After some debugging, as far as I can tell, this is caused by all controls getting their ChangeScale method called (as you would expect) which results in calls to SetBounds, which invalidates the control causing more painting! TWinControl.ScaleControlsForDpi appears to be doing the right thing (control alignment is a perf hog), but calling EnableAlign inevitably invalidates the control, again. procedure TWinControl.ScaleControlsForDpi(NewPPI: Integer); var I: Integer; begin DisableAlign; try for I := 0 to ControlCount - 1 do Controls[I].ScaleForPPI(NewPPI); finally EnableAlign; end; end; This really show up an inherent design flaw in the vcl, there is no BeginUpdate/EndUpdate design pattern in the vcl that allows a control (or form) to disable child controls painting until it's done. Many controls implement this pattern individually, but that doesn't help in this scenario. The situation isn't helped by my using Vcl Themes either - resize (setbounds) causes serious flicker in some controls and I'm sure this is coming into play here too. I tried to fudge a BeginUpdate/EndUpdate with this : procedure TMainForm.WMDpiChanged(var Message: TWMDpi); begin SendMessage(Self.Handle, WM_SETREDRAW, NativeUInt(False), 0); try inherited; finally SendMessage(Self.Handle, WM_SETREDRAW, NativeUInt(true), 0); RedrawWindow(Self.Handle, nil, 0, RDW_INVALIDATE or RDW_UPDATENOW or RDW_ALLCHILDREN); end; end; It cut's out the visible repainting, but doesn't speed things up much If anyone has any ideas on how to tackle this I'm all ears.
-
If you need an integration for MarkDown files into Delphi apps, you can find some interesting open-source projects that I'm working on. MarkDownHelpViewer Project The MarkDownHelpViewer, is an Open-Source project to provide a Delphi-integrated help system using markdown files for online "help" creation. The project includes a ready Viewer with its setup to be installed on the user's machine (in practice the equivalent of hh.exe for the help in .chm format (see image) and an "interface" file to add to your own application that hooks the viewer to the "HelpContext" or "HelpKeyword" set on the Delphi components. Besides this also a component that can be used internally to the Delphi application to display help files. Here is the link to the project: https://github.com/EtheaDev/MarkdownHelpViewer This is a "Preview" of the viewer showing the help from the "wiki" of the InstantObjects project: There's also a small demo in the project that explains how to integrate the help with your Delphi application, including the ability to use a MarkDownViewer component right inside your application: The MarkDownShellExtensions Project In addition to the viewer, I recommend to use the MarkDown file editor, which comes with my other project available here: https://github.com/EtheaDev/MarkdownShellExtensions with which it is possible to edit the MarkDown files and immediately see the preview of the final result: Combining the two projects you will be able to offer your Delphi applications a fully integrated and easy to maintain Help system for the end user: when you need to update the images of your application because the GUI has changed, it will be sufficient to update the image on disk and update the associated markdown file, without the need for further updates, in order to always have the help updated to the latest release. Furthermore, the MarkDown format allows it to be easily published (for example as a "wiki" on Git-Hub) and is easily maintainable because it can be subjected to version-control. Those two projects are based on other Open-source projects, like: 1: SVGIconImageList: https://github.com/EtheaDev/SVGIconImageList 2: HtmlViewer: https://github.com/BerndGabriel/HtmlViewer) 2: SynEdit: https://github.com/SynEdit/SynEdit 3: VCLStyleUtils: https://github.com/RRUZ/vcl-styles-utils 4: Delphi-Markdown: https://github.com/grahamegrieve/delphi-markdown
-
discount ANN: Summer Sale - 40% discount on NextGrid, NextDBGrid, NextInspector
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We are offering an excellent opportunity to get 40% off on our Next Suite Delphi (VCL) Components. Just use SUMMER2023 coupon code on the checkout page to get 40% off. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. new Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip BergSoft Home Page: bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: help.bergsoft.net -- BergSoft Facebook page -
In an earlier thread I presented an Interface-based access to native Windows (Direct2D) SVG support for Delphi applications. This has now been integrated into the SVGIconImageList components by @Carlo Barazzetta. Carlo is a kind of master of ImageLists (among other things). Have a look at his IconFontsImageList for instance. His SVGIconImageList component was based on the work of Martin Walter who must be a great programmer. His SVG component covered almost every SVG element and was well structured and cleanly written. There were numerous bugs and issues though, which, to a large extent, were fixed over the last few weeks and the code was refactored and optimized. Finally, @Vincent Parrett contributed a virtual version of the Image List, mirroring Delphi's VirtualImageList. So in its current form the component features: An SVGImageCollection component that inherits from Delphi's CustomImageCollection and thus is compatible with VirtualImageList A choice of SVG engines: the pascal one based on Martin's work which is using GDI+ and the native Windows one which is using Direct2D. Other SVG engines can be plugged-in with minimum effort. Excellent design support with a nice and effective SVGImageCollection editor developed by Carlo and the built-in VirtualImageList editor. Support for changing the opacity and color of the SVGs including using GrayScale. If you adopt Material Design for example and you use VCL styles, you can adjust the icon color to the style. Compatibility with older Delphi versions going back to XE6. It is free and open-source Svgs are vastly superior to bitmaps because they are typically tiny text files and scale perfectly. So, you do not need to ship with your application multiple resolutions of your images to match the DPI of the monitors. And there is a vast number of free SVGs to cover most needs. IMHO the combination of SVGImageCollection with Delphi's VirtualImageList is the best available solution (commercial ones included) for building DPI-aware Windows applications. Give it a try.
-
ANN: New version of NextSuite6 (Grid, DBGrid, Inspector...) 🚀
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too. -
ANN: New version of NextSuite6 (Grid, DBGrid, Inspector...) 🚀 + 35% discount
Bergsoft posted a topic in Delphi Third-Party
Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. This update introduces a range selection type to all grid view types: At the moment we are offering 35% Easter discount. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too. -
New Behaviour Weird: My new VCL Forms (ALL) (in new projects) using "SHOW" procedure always in TOPMOST on ZOrder after SetWindowPos usage
programmerdelphi2k posted a topic in VCL
hi People, I don't know what to think to solve the current problem I got myself into! From the beginning... doing some tests with the "SetWindowPos(...)" MSWin-API function, I realized that my new forms created and called from the main form, using the "SHOW" procedure, were no longer being in the background!!! That is, the new forms are always in the foreground, regardless of whether or not the "FormStyle = fsStayOnTop" is set!!!! to clarify further: all new forms are "FormStyle=fsNormal"... ALL, either formMain, or a formSecond called in formMain! none of the form properties (at all) were changed, it's all default by Delphi. nothing nothing nothing is being changed The new VCL projects are creating forms always in TOPMOST after my tests with the function call "SetWindowPos(...)" that I made in a test project!!! After a moment of total madness (laughs), I tried checking the Embarcadero Registry (HLM/HCU) to see if any properties were defined during the tests, but I didn't find anything strange.... I tried to check some configuration file in the Embarcadero folder (in the user's system folders), but I didn't find anything that gave any information either! Finally, I went to the extreme and completely uninstalled RAD Studio, deleted folders, files and keys in the Registry... everything! And I did a reinstall from scratch! But nothing solved it... my new forms still having the TOPMOST property, this way, creating and calling the sub-forms through the "SHOW" procedure, always placing the sub-forms on the application's main form! Finally, my suspicion is that I bugged MSWindows and now Delphi will always be using create forms as TOPMOST... Has anyone been through this situation or can indicate a way to reverse this situation? watch the two videos using same code Video 1: before tests with SetWindowPos Form1 (main form) call Form2 (second form) using Form2.SHOW; clicking in Form2, it came to front clicking in Form1, it came to front OK!!! all it's working! Video 2: after tests with SetWindowPos Form1 (main form) call Form2 (second form) using Form2.SHOW; clicking in Form2, it came to front clicking in Form1, it DONT came to front now FORM2 is always on TOP.... 😭 Here the code used in my tests, nothing more than this 2 forms in tests (main and second forms) had all properties default and none code, basically empty! this code was in my Form1 procedure TMeuFormParaTest.Button1Click(Sender: TObject); begin SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Width, Height, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE); end; procedure TMeuFormParaTest.Button2Click(Sender: TObject); begin SetWindowPos(Handle, HWND_BOTTOM, Left, Top, Width, Height, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE); end; after this code, all changed in my Delphi... new projects have its forms using "FormXXX.SHOW" as TOPMOST, and over my form caller (normally my Form-Main) AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH! Im crazy with this! attached my project test with 2 forms and almost none code! VCL_Forms_always_TOPMOST_Now_in_New_Projects.zip ... -
VCL or FMX: My sample using Thread running in another forms for some tasks...
programmerdelphi2k posted a topic in General Help
My sample using Thread running in another forms some tasks... not 100% perfect or SAFE... but works if you take a care about my "little code" of course, needs to know "what going on..." and to do some changes for a specific usage... then, dont blame me, this it's just a simple sample. ok? take the idea and do better!!! maybe a "container using Observer Pattern" would help here, but "arrays" was good for me in this time! try close all forms, or simply the mainform 🙂 you CAN click many time on Button and raise yourS threadS... 1x, 2x, 3x, etc... dont abuse :))) // ---- FormMain ----- var MainForm : TMainForm; LHowManyThreadRunning: integer = 0; // Global vars was just for my test... dont use it, at all!!! implementation {$R *.dfm} uses uFormWithThread; var LArrForms: TArray<TForm>; LTop : integer = 0; LLeft : integer = 0; procedure MyDestroyForms; begin for var F in LArrForms do if (F <> nil) then FreeAndNil(F); end; procedure TMainForm.Bnt_Call_Form_ThreadClick(Sender: TObject); var i: integer; begin i := Length(LArrForms); LArrForms := LArrForms + [TFormWithThread.Create(nil)]; LArrForms[i].Top := LTop; LArrForms[i].Left := LLeft; LArrForms[i].Show; // LTop := LTop; LLeft := LLeft + LArrForms[i].Width; end; procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose := LHowManyThreadRunning = 0; end; procedure TMainForm.FormDestroy(Sender: TObject); begin MyDestroyForms; end; procedure TMainForm.Btn_Try_Close_All_Form_ShowingClick(Sender: TObject); begin for var F in LArrForms do if (F <> nil) then F.Close; end; initialization ReportMemoryLeaksOnShutdown := true; end. // --- Secondary Forms... var FormWithThread: TFormWithThread; implementation {$R *.dfm} uses uMyThread, uFormMain; var LArrThreads: TArray<TMyThread>; function MyCanClose: Boolean; begin result := false; // while (Length(LArrThreads) > 0) do begin // trying kill the thread... LArrThreads[0].Terminate; LArrThreads[0].WaitFor; LArrThreads[0].Free; // // if ok, remove it from list delete(LArrThreads, 0, 1); end; // LHowManyThreadRunning := Length(LArrThreads); result := LHowManyThreadRunning = 0; end; procedure TFormWithThread.Btn_RunThreadClick(Sender: TObject); var i: integer; begin i := Length(LArrThreads); LArrThreads := LArrThreads + [TMyThread.Create(MyUpdateButtonCaption)]; // Memo1.Lines.Add(TimeToStr(now) + ' CurrentThread: ' + TThread.CurrentThread.ThreadID.ToString + ' ... App'); // LArrThreads[i].Start; // LHowManyThreadRunning := LHowManyThreadRunning + 1; MyAnimation.StartAnimation; end; procedure TFormWithThread.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin LHowManyThreadRunning := Length(LArrThreads); CanClose := LHowManyThreadRunning = 0; // if not CanClose then CanClose := MyCanClose; end; procedure TFormWithThread.MyUpdateButtonCaption(const AValue: string); begin Memo1.Lines.Add(TimeToStr(now) + ' CurrentThread: ' + TThread.CurrentThread.ThreadID.ToString + ' ' + AValue); end; end. unit uMyThread; interface uses System.SysUtils, System.Classes, System.Threading; type TMyProcReference = reference to procedure(const AValue: string); TMyThread = class(TThread) strict private FProc : TMyProcReference; FLCounter : integer; FLThreadID: string; protected procedure Execute; override; procedure DoTerminate; override; public constructor Create(const AProc: TMyProcReference = nil); overload; end; implementation { TMyThread } constructor TMyThread.Create(const AProc: TMyProcReference = nil); begin inherited Create(true); // FProc := AProc; FLThreadID := ThreadID.ToString; FLCounter := 0; end; procedure TMyThread.DoTerminate; begin FLThreadID := ThreadID.ToString; // if Assigned(FProc) then TThread.Queue(nil, procedure begin FProc('This is the end! FLThreadID: ' + FLThreadID + ' LCounter: ' + FLCounter.ToString); end); end; procedure TMyThread.Execute; begin while not Terminated do begin FLThreadID := ThreadID.ToString; // if (FLCounter = 100) then break; // if Assigned(FProc) then TThread.Queue(nil, procedure begin FProc('FLThreadID: ' + FLThreadID + ' LCounter: ' + FLCounter.ToString); end); // // simulating a process... "LCounter just for test n process" FLCounter := FLCounter + 1; sleep(500); end; end; end. -
Questions about Application and Package .dproj files.
Pat Foley posted a topic in Delphi IDE and APIs
I have noticed that Delphi adds Ios and Android deploy information even for packages. What switch adds this to .dproj <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/> How to set the unit output for 32 and 64 in a MyPackage? I tried the codegear dslusr and it would not allow dropping the control on a form in 64 mode. Controls could be placed on form in 32 mode though. I removed and made a fresh package that allows the controls to be placed on form. 🙂 And what about Versioning? The following always brings 1.0.0 for myapp. function TptrApps.getVersionasString(inAppName: string): string; var Major, Minor, Build: Cardinal; begin Try Major := 6; Minor := 6; Build := 6; GetProductVersion(inAppName, Major, Minor, Build); result := Format('%d.%d.%d', [Major, Minor, Build]); Except on E: Exception do result := E.ClassName + ':' + E.Message else result := 'Trouble '; End; end; Thanks, Pat -
Hey there, It's Mert, newest guy at the forum. Saw that community is talking for important topics. I would like to ask a question to you all. First of all, I asked it first to @ertank , He answered me with significant words. I appreciate it. Me and my team jumped to C++Builder 11.2 about 1 month ago. We were using Embarcadero's previous versions but we want to add new features to our project with new developed components. Everybody know that DevExpress is also developing lovely components to VCL environment. My question is; if we take away DevExpress cost, is it most likely necessary to use and build our project with DevExpress components. What's about Embarcadero's own developed components vs DevExpress features? Is Embarcadero doing good job with their new components or are they not caring enough? On the other hand, what's about DevExpress VCL features? Waiting comments from you all. Thanks.
- 21 replies
-
- vcl
- devexpress
-
(and 2 more)
Tagged with:
-
Hi, On a fairly large sized application with a few threads doing most of the work the UI does have 2 timers for updating fields based on calls to Thread class properties, I get a almost consistent pauses in the UI (ie... progress bar updates, TRichEdit line adds and TLabel caption updates) unless my mouse pointer is moved over the window. This is on a PC with two monitors. Is there something I can call to keep the UI from pausing? I tried finding other posts that ask this before posting here. Thanks. David
-
ANN: New version of NextSuite6 (Grid, DBGrid, Inspector...) released 🚀
Bergsoft posted a topic in Delphi Third-Party
Online Store and PricesDear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news and see what we are working on for the next release! Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code. and many more. Few screenshots: Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too. -
v4.0.0 Skia library version has been updated from Milestone 98 to 107; [API] Added support for iOS Simulator ARM 64-bit to RAD Studio 11.2 Alexandria or newer. [API] Added TBitmap.CreateFromSkImage; [Framework] Added LinesCount and DidExceedMaxLines properties to TSkLabel; [Framework] Added new splashscreen to our main demo; [Samples] Added ISkParagraph.Visit method; (#136) [API] Rewritted TSkAnimatedImage and TSkAnimatedPaintBox, adding features to have full control over the animation; (#104) [Framework] Some of them are: Start and Stop methods, and AutoReverse, CurrentTime, Delay, Duration, Enabled, Inverse, Loop, Pause, Progress, Running, Speed, StartFromCurrent, StartProgress and StopProgress properties. All these properties and methods are in the Animation property of the TSkAnimatedImage and TSkAnimatedPaintBox. Improved automatic tests; [Tests] Fixed issue in edit controls with emoji or Chinese char; (#159) [Render] Fixed custom fonts on Android deployed to assets\internals that was not automatically loaded; (#153) [Render] Fixed webinar demo splashscreen; [Samples] Fixed exception loading images from stream or bytes; (#111) [Framework] Fixed TSkAnimatedImage exceeding bounds in some WrapMode [Framework] Fixed TBitmap.SkiaDraw issues in VCL; [Framework] Fixed TBitmap.ToSkImage AV in VCL; [Framework] Fixed flicker problem in TSkAnimatedImage in VCL; [Framework] Fixed text print; (RSP-16301) [Render] Fixed TSkAnimatedImage with 90° rotation that fails to play; [Framework] Fixed high DPI issues of TSkLabel in VCL; [Framework] Fixed high DPI issues in VCL demo; [Samples] Fixed SkRegion.IsEqual; [API] Fixed link with runtime packages; (#163) [Setup] Fixed big GIF issue; (#118) [API] Fixed wrong pixel format on Android in Delphi 10.3 Rio; [Render] Minor improvements and fixes. Skia version: 107.0.0 Compatibility break We are in continuous development, so some updates will bring compatibility breaks. So, pay attention to version numbers, we use semantic versions (for major versions there is some compatibility break). See some breaking changes in this version: No longer use TSkAnimatedImage.Enabled to start or stop an animation. Now use TSkAnimatedImage.Animation.Enabled. The class TSkTypefaceManager is deprecated in favor to TSkDefaultProviders; Several changes in API (Skia.pas); Supported platforms RAD Studio 11 Alexandria: All platforms RAD Studio 10.3 Rio or newer: Windows and Android RAD Studio XE7 or newer: Windows Github: github.com/skia4delphi/skia4delphi Website: skia4delphi.org
-
New job opportunity if you are experienced. Prefered location is Kokkola Finland but remote work is accepted. https://attracs.teamtailor.com/jobs/1660578-delphi-developer/45cf12cb-1f96-4e93-94c1-8b96c6a45ade