-
Content Count
1406 -
Joined
-
Last visited
-
Days Won
22
Everything posted by programmerdelphi2k
-
Beginner to Delphi. Have no idea what I'm doing wrong here
programmerdelphi2k replied to Willicious's topic in Delphi IDE and APIs
1) pay attention on "param type", in case: "KEY = WORD type", or be, "a number" not a "letter" Byte, Word, SmallInt, Integer, Double, etc.. = numberic value string, char, shortstring, etc.. = character value (number, letter, symbol quoted) 2) if you need that a "control" stay on focus in your form, try use property "ActiveControl" on form (in design-time or runtime) too! no need a coding, at all. -
Rx11.3: IDE project tree disappears suddenly ( empty window )
programmerdelphi2k replied to Rollo62's topic in Delphi IDE and APIs
@Rollo62 if the project is from old-IDE, did you try delete all files created by IDE, like *.dproj, and *.res etc... and building under RAD11.3? sometimes I do the (crazy) tests, like: backup a folder or files, when all is out-control, you see, and.... delete all files (in project) created by IDE c:\users\...\"Embarcadero" <-- and delete all, and run my IDE again etc... new fresh files!!! sometimes works, sometimes not! but dont worry, I has my "restore-files" -
Delphi 11.3 - Android 13 - Fail deploy of all projects
programmerdelphi2k replied to Mauro Botta's topic in Cross-platform
try delete all folder/files (including Android.Manifest.xml) created by Delphi when build/compile and try re-build ALL again! your error talk about "android:exported" not defined!!! look here: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Android_Service -
Code Insight index location to ram disk?
programmerdelphi2k replied to bdw_nz20's topic in Delphi IDE and APIs
no, what was the "LSP" folder used in your command-line? can you show your command-line? -
Code Insight index location to ram disk?
programmerdelphi2k replied to bdw_nz20's topic in Delphi IDE and APIs
how do you did with this scenary? (command-line?) -
@Remy Lebeau As MSWin is the basis for WinControls, then, I thought that it was "he who created the objects, in fact" (and "Create by Delphi" was just a memory allocator, use see?), and... only later, these objects were offered to Delphi, in this case! Hence, my doubt about who really was the "primary owner" of the object... But thanks anyway!
-
Code Insight index location to ram disk?
programmerdelphi2k replied to bdw_nz20's topic in Delphi IDE and APIs
did you try this: re-direct the "original" folder where LSP store its file to your RAM-drive? in MSWin10 I use "MKLink" in my "saves-original-folder ... in games", then, all files will be stored (save) in another disk/folder" mklink /d /j "c:\folder_source" "d:\my_target" // d=directory j=junction == Symbolic link -
Code Insight index location to ram disk?
programmerdelphi2k replied to bdw_nz20's topic in Delphi IDE and APIs
did you try change to "Classic" mode? in Help say that you can create a "New" LSP setup, did you see this? in Registry, you can change some definitions, did you see this? Filing Bugs and Log Files https://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Insight_Reference -
I need help with TRestRequest!
programmerdelphi2k replied to Carlos_Reyes's topic in Network, Cloud and Web
Is not possible try in RestDebugger? (it create your compinents with all properties...) later, just copy for your form and see what was done -
some like this...? (from CodeProject in C sources) in Delphi procedure TForm1.Button3Click(Sender: TObject); var LScreenWidth : Integer; LScreenHeigth : Integer; LHWndDesktop : HWND; LHDCDesktop : HDC; LHDCCapture : HDC; LHBitmapCapture: HBITMAP; begin LHWndDesktop := 0; LHDCDesktop := 0; LHDCCapture := 0; LHBitmapCapture := 0; try // maybe it's better verify if ( HDCxxxx > 0) then ... LScreenWidth := GetSystemMetrics(SM_CXSCREEN); // screen sizes LScreenHeigth := GetSystemMetrics(SM_CYSCREEN); // LHWndDesktop := GetDesktopWindow; LHDCDesktop := GetDC(LHWndDesktop); // LHDCCapture := CreateCompatibleDC(LHDCDesktop); LHBitmapCapture := CreateCompatibleBitmap(LHDCDesktop, LScreenWidth, LScreenHeigth); // SelectObject(LHDCCapture, LHBitmapCapture); BitBlt(LHDCCapture, 0, 0, LScreenWidth, LScreenHeigth, LHDCDesktop, 0, 0, SRCCOPY {or CAPTUREBLT} );// Image1.Picture.Bitmap.Handle := LHBitmapCapture; // just get the handle of this object... // storing in some place (disk, memory,etc...) to load later... // Image1 is TImage just show on form tests... Image1.Picture.Bitmap.SaveToFile('bmptemp.bmp'); Image1.Picture.Bitmap.LoadFromFile('bmptemp.bmp'); finally ReleaseDC(LHWndDesktop, LHDCDesktop); DeleteDC(LHDCCapture); DeleteObject(LHBitmapCapture); // this destroy the LHBitmapCapture (reference) above! end; end;
-
and Tezeus ran, ran, fleeing the labyrinth and the Minitaurus... however, he found Medusa on his way out, and petrified to death.
-
ok thanks
-
thanks @Dalija Prasnikar Ok, but if we use "Create" from Delphi, as it is the default and widely used for this task, and... Delphi calls (uses) the class of this control defined in MSWindows, for example, TEdit uses the definitions from the MSWindows Edit control, so aren't we actually calling a task defined in MSWindows and transferring its owner to Delphi? ... that is, an OS API thread (performs the actions of a lower level) transfers to a thread (main) in Delphi (of a higher level)... isn't that what happens? I don't know if I managed to explain my train of thought...
-
A question about a doubt that torments me sometimes: if visual controls are inherited from the operating system (the parent classes), at its core, and used by Delphi in its pertinent classes, like TEdit(... TWinControl), after all: Which thread actually creates the visual control (i.e. the object used by Delphi), the MSWindows API or the pseudo class in Delphi? And, if the final object (if it comes from AP Windows) is created by the OS, and then perfected by Delphi (in its pertinent classes), there would not be a transfer of "ownership" between the threads of the operating system and the thread Delphi application main? Another thing: if basically everything comes via message from the operating system, and intercepted by the application (thread main) Delphi, a very tight semaphore could really degrade future actions in the interface, no?
-
TNumberBox and scientific notation (exponential format)
programmerdelphi2k replied to Gord P's topic in VCL
maybe some like this ??? NOTE: when replace a value on NumberBox (old values) was verifyed that "e" will be accepted!!! then needs more tests... ok? NOTE2: NumberBox1.Text is always "old value", better works to "NumberBox1.VALUExxxxx" type TForm1 = class(TForm) NumberBox1: TNumberBox; procedure FormCreate(Sender: TObject); private procedure MyOnValidChar(AChar: char; var AValidated: boolean); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin FormatSettings.DecimalSeparator := '.'; // NumberBox1.Mode := TNumberBoxMode.nbmFloat; NumberBox1.Decimal := 20; // ?? NumberBox1.DisplayFormat := '0.0E+;0.0E-;Hello'; // NumberBox1.OnValidateChar := MyOnValidChar; // <------ end; procedure TForm1.MyOnValidChar(AChar: char; var AValidated: boolean); begin if CharInSet(AChar, ['E', 'e']) then begin if NumberBox1.ValueFloat = 0 then // eNNNN.NNN ??? AValidated := false else AValidated := string(NumberBox1.Text).ToLower.CountChar('e') = 0; // NOT "Neeee" end; end; -
I think that my first sample it's good and simple, just using basic idea with "obj containers". Using "FlowPanel", it's not so wrong... but I think that "it" it's not for this tasks... but if OP want more coding then both would can do it! (not necessary so easy using FlowPanel)
-
really, I dont see "ControlIndex" helping in this task... try expand/colapse the "FlowPanel" as my sample above and see the real resulted... 😩 no no no! now, if you need just "hide/show" then, any other "container with many panels" do it, not? (be Panel, FlowPanel, Rectangles, etc...
-
Memory Leak after FireDAC loses DB connection
programmerdelphi2k replied to Monte Carver's topic in Databases
there are many variants to think about: do you try to "close" the FDQry when "lost connection" is noticed? if, your FDQry are being used to run tasks on threads, for example? ...threads need to be notified in case of connection loss and stop any actions related to them! -
TNumberBox and scientific notation (exponential format)
programmerdelphi2k replied to Gord P's topic in VCL
maybe.... -
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
programmerdelphi2k replied to David Schwartz's topic in Databases
this can help you? https://github.com/viniciussanchez/dataset-serialize Sample: https://raw.githubusercontent.com/viniciussanchez/dataset-serialize/master/img/img-02.png -
Normally, I delete all "Wellcome... .BPL" references on Registry on "[HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0\Known IDE Packages]" ... I HATE THIS PLUGIN!!! 😂 you can try just use "-np" param on BSD.exe command-line too!
-
did try this https://stackoverflow.com/questions/67764080/delphi-change-ribbon-menu-color-when-vcl-theme-is-applied
-
The best way to handle undo and redo.
programmerdelphi2k replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
I think that in a multiuser environment or even in "multiple read and write concurrency", this would not be a sensible thing to do!!!! You would need to "lock" the entire database to make sure you actually completed what you wanted to do! Who could perform the task? What task would be wanted at the end of it all? And, if the first task was desirable, however, another one was carried out at the end of it all? This situation is very complicated!!! I think it's too much of a headache for data engineers to implement an incremental "backup/restore" with the database online, isn't it? Now, imagine deciding which data in a record will be effectively recorded after thousands of requests? In a more simplistic way, perhaps create a specific table to receive the "logs" (a kind of "historical table: time, recordID, record-fields-values, etc...") of records from "a table" that want to do such a task, it could be a little easier... or not! now imagine that this history-table receives thousands of entries per second... isn't it complicated? -
TStringGrid ComboBox not updating dataset
programmerdelphi2k replied to TrevorS's topic in Cross-platform
other way is using the "var Control" param on "CreateCustomEditor" event: implementation {$R *.fmx} function fncMyComboBox: TComboBox; // my Control used in my TGrid-CustomEditor... begin // it will be "created"... and "destroyed by Grid" result := TComboBox.Create(nil); // result.Items.AddStrings(['One', 'Two', 'Three']); // result.OnChange := Form1.MyComboBoxChange; end; procedure TForm1.MyComboBoxChange(Sender: TObject); begin if not(Sender is TComboBox) then exit; // try BindSourceDB1.DataSet.Edit; BindSourceDB1.DataSet.FieldByName('MyId').Value := TComboBox(Sender).Selected.Index; BindSourceDB1.DataSet.Post; except // ??? end; end; procedure TForm1.Grid1CreateCustomEditor(Sender: TObject; const Column: TColumn; var Control: TStyledControl); begin if (Column.Index = 0) then Control := fncMyComboBox; // who's the "destroyer" now? end; initialization ReportMemoryLeaksOnShutdown := true; // any memory leaks? end.- 4 replies
-
- tstringgrid
- fmx
-
(and 4 more)
Tagged with: