![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2020_10/A_member_3713.png)
alogrep
Members-
Content Count
161 -
Joined
-
Last visited
Everything posted by alogrep
-
Hola Peter (not Paul!) Below😀. What happend: there was a power failure. I exit the IDE (saving wip). The PC was "shutting down" but the UPS ran out of battery before the shutting down terminated. Now the .pas file I am interested in is full of '0' (checked with a binary file viewer. The history shws the file and the Buffer both empty. Withe the old system, the ~pas file that had been saved previusly, I would have lost the .pas and the wip, but I could have retrieved the .~pas. Here, I lost everything.
-
Embarcadero can you please STOP making your install sooooo MARVELOUS?
alogrep posted a topic in General Help
Good Morning I paid subscription renewal, ia download and installed delphi 12.0 I test a VCL program with one button, onclick = showmessage('Hello'); It blows my mind when I see "[dcc32 Error] E1026 File not found: 'Controls.res' Embarcadero, can you please do your (paid work)??? Why do I have to spend days fixing your bugs? Sorry, I am angry YES, but on every upgrade I find problems! Can you test your installation app maybe 20 or 30 times before selling it to me and others"? Anyway if there is a good soul that care to give me a clue as to what do, I would I appreciate it./ -
Embarcadero can you please STOP making your install sooooo MARVELOUS?
alogrep replied to alogrep's topic in General Help
Kas, thanks. No. -
Embarcadero can you please STOP making your install sooooo MARVELOUS?
alogrep replied to alogrep's topic in General Help
Thanks Vandrovnik. No. But I repeat, the .~pas (and .~dfm) file was always created until now. Drom D5 through XE, 10,11. It was created automatically in the same folder where the .pas file is. (not in the __history) Suddenly this behaviour disappeared. -
Embarcadero can you please STOP making your install sooooo MARVELOUS?
alogrep replied to alogrep's topic in General Help
Sorry, Uwe. I guess I should not run installations at four O'Clock in the morning. No, I did not delete nor "touch" anything. As soon as the installation terminated I did the test program. I checked the Library and it showed the attached (lib.jpg). Luckily I still have my Delphi 11 installed and so I copied the library path from there and so far it seems it works. BUt even this new version does not create the '~pas backup file. What I mean, since the beginning (D5) until a month ago every time I modified sayUnit2.pas, when I saved it, Delphi created Unit2.~pas . This feature stopped. Do you have any idea as to how can I reactivate it? -
Roger, sorry. I am talkng about this: since Delphi 5, everytime I saved a pas/dfm u nit, it would create a ~pas/~dfm AUTOMATICALlY. I did not have to go to _history (or _math), no, where the pas was, the ~pas was created. In the last couble of months this stopped happening. How Do I reestore taht useful feature?
-
Thanks both. I did check "Create backup files" But it did not crate a "*.~pas . I changed unit3a.pas, sdaved the chage, and whe I look in DOS i see Directory of C:\hm\posdev 24/03/2023 09:01 p. m. 111,252 unit3a.~pas but I changed today: 08 Jan 2024!!!!
-
Thanks. But I cannot find "Create backup fiels" (see attached please)
-
Your Android device does not support the selected target platform architecture
alogrep posted a topic in FMX
HI. I kindly ask some help. Windws 10, Delphi 11, Xiaomi 9A device. I tried to run a Helloworld example from Github. The project builds ok, the device paltform android 64 bit shows the Target (M2006C3LG). But when I run it I get the error "Your Android device does not support the selected target platform architecture". Where/what should I look into to get the solution to this problem? -
Hi. Delphi 11.3. Open an existing project, press DEL Key twice (to delete 2 letters) and the IDE goes fishing: keystrokes or mouse totally disabled. Need taskbar to end it. Anybody experienced this? Funny thing: I put IDE in the serach of this newsgroup and get zero results.
-
Brian Evans It produced a report that is in erro_list,txt that I re-send now. I just kept answering the prompts taht came up from embarcadero. I had assumed the report was gonna be sent automatically. error_list.txt
-
Problem somewhat solved; Perhaps this was the culprit: I had 320 Units listed in the uses section of the Project. I removed abut 1/2 of then and added the relatives paths to the Search path. When I saved the project something from Embarcadero came up, I filled in all the fields anc I sent it. I hope the errors shown in error_list.txt got to them, so they can fix the bug error_list.txt
-
The steps are simple. Only one project is affected. I laucnh this project, in the Project source page I clik a few keys (whatever they are, DEL, Back space or letters) and the IDE freezes. There is no network mapppong, at list Net Use shows none.
-
Hi. I used the code below to print Richedit in pre-XE Delphi for many years. Now it get stuck in the repeat loop: In my test, the first nextchar gives 571, in the next and all subsequent cals gives 570. Gence the loop hangs. Does Anybody have any ideas as to what has changed or what am I doing wrong? Printer.BeginDoc; try With Printer.Canvas Do Begin printresX := GetDeviceCaps( handle, LOGPIXELSX ); printresY := GetDeviceCaps( handle, LOGPIXELSY ); printarea:= Rect( printresX div 2, // 0.5 inch left margin printresY div 2, // 0.5 inch top margin Printer.PageWidth - (printresX div printresX), // 0.5 inch right margin Printer.PageHeight - (printresY-2) // 1 inch bottom ); richedit_outputarea := Rect( (printarea.left) * 1440 div printresX, ((printarea.top) * 1440 div printresY), (printarea.right) * 1440 div printresX, (printarea.bottom)* 1440 div printresY ); fmtRange.hDC := Handle; // printer handle fmtRange.hdcTarget := Handle; // ditto fmtRange.rc := richedit_outputarea; fmtRange.rcPage := Rect( 0, 0, Printer.PageWidth * 1440 div printresX, Printer.PageHeight * 1440 div printresY ); fmtRange.chrg.cpMin := 0; fmtRange.chrg.cpMax := richedit1a.GetTextLen; // remove characters that need not be printed from end of selection. // failing to do so screws up the repeat loop below. S:= richedit1a.Text; While (fmtRange.chrg.cpMax > 0) and (S[fmtRange.chrg.cpMax] <= ' ') Do Dec(fmtRange.chrg.cpMax); pageof:=0; //total number of pages Repeat // only count pages here. // Render the text nextChar := richedit1a.Perform( EM_FORMATRANGE, 0, Longint(@fmtRange)); fmtRange.rc := richedit_outputarea; Inc(pageof); If nextchar < fmtRange.chrg.cpMax Then Begin // more text to print fmtRange.chrg.cpMin := nextChar; End; { If } Until nextchar >= fmtRange.chrg.cpMax;
-
Thanks Peter. I copied from the TcustonRicheit.Print() founcion to modify my code (now includes printing multiple pages) as shown in the code section below. It works just fine. var ...... MaxLen: Integer; TextLen: TGetTextLengthEx; ........ try Printer.BeginDoc; TextLen.Flags := GTL_NUMCHARS; TextLen.CodePage := 1200; // Unicode MaxLen := SendMessage(richedit1a.Handle, EM_GETTEXTLENGTHEX, LPARAM(@TextLen), 0); try With Printer.Canvas Do Begin printresX := GetDeviceCaps( Printer.Canvas.handle, LOGPIXELSX ); printresY := GetDeviceCaps( Printer.Canvas.handle, LOGPIXELSY ); if reptype= 13 then printarea:=Rect(1,printResY div 2, Printer.PageWidth-1,Printer.PageHeight - (printresY-2)) else printarea:= Rect( printresX div 2, // 0.5 inch left margin printresY div 2, // 0.5 inch top margin Printer.PageWidth - (printresX div printresX), // 0.5 inch right margin Printer.PageHeight - (printresY-2) // 1 inch bottom ); richedit_outputarea := Rect( (printarea.left) * 1440 div printresX, (printarea.top * 1440 div printresY), (printarea.right) * 1440 div printresX, (printarea.bottom)* 1440 div printresY ); fmtRange.hDC := Printer.Canvas.Handle; // printer handle fmtRange.hdcTarget := Printer.Canvas.Handle; // ditto fmtRange.rc := richedit_outputarea; fmtRange.rcPage := Rect( 0, 0, Printer.PageWidth * 1440 div printresX, Printer.PageHeight * 1440 div printresY ); fmtRange.chrg.cpMin := 0; fmtRange.chrg.cpMax := richedit1a.GetTextLen; pageof:=0; //total number of pages Repeat // only count pages here. // Render the text nextChar := SendStructMessage(richedit1a.Handle, EM_FORMATRANGE, 0,fmtRange); Inc(pageof); If nextchar < MaxLen Then Begin // more text to print fmtRange.chrg.cpMin := nextChar; End; { If } Until nextchar >= Maxlen; // Free cached information richedit1a.Perform( EM_FORMATRANGE, 0, 0); fmtRange.hDC := Printer.Canvas.Handle; // printer handle fmtRange.hdcTarget := Printer.Canvas.Handle; // ditto fmtRange.rc := richedit_outputarea; fmtRange.rcPage := Rect( 0, 0, Printer.PageWidth * 1440 div printresX, Printer.PageHeight * 1440 div printresY ); fmtRange.chrg.cpMin := 0; fmtRange.chrg.cpMax := richedit1a.GetTextLen; page := 1; Repeat // now actually print // Render the text nextChar := SendStructMessage(richedit1a.Handle, EM_FORMATRANGE, 1,fmtRange); if not (reptype in [9,10,12]) then with dm1.systable do begin if reptype <> 13 then Textout(printarea.left{+printresx},printarea.bottom+ (printresy div 2),FieldByName('Name').AsString+' '+LG('Report Printed')+' '+FormatDateTime('dd-mmm-yyyy hh:mm:ss',Now)); TextOut(printarea.right-printresx,printarea.bottom+ (printresy div 2), 'Page: '+inttostr(page)+ ' ' +lg('of') +' '+IntToStr(pageof)); end; Inc(page); If nextchar < MaxLen Then Begin // more text to print printer.newPage; fmtRange.chrg.cpMin := nextChar; End; { If } Until nextchar >= MaxLen; // Free cached information richedit1a.Perform( EM_FORMATRANGE, 0, 0); end; printed:=true; if cap1<> '' then begin richedit1a.lines.delete(richedit1a.lines.count-1); richedit1a.lines.delete(richedit1a.lines.count-1); end; finally Printer.EndDoc; end; The relevnt part seems to be this way of ca,culatin the texzt length: TextLen.Flags := GTL_NUMCHARS; TextLen.CodePage := 1200; // Unicode MaxLen := SendMessage(richedit1a.Handle, EM_GETTEXTLENGTHEX, LPARAM(@TextLen), 0);
-
I g=found this code here: https://stackoverflow.com/questions/22234371/how-to-print-the-contents-of-a-richedit. It seems to work pretty well. However, I like to print a small logo (saved as abitmap separately) at the sart of the printing, followed by the richedit content, all on the same page.. Is that possible? procedure PrintRichEdit(RichEdit: TRichEdit; const Caption: string; const PrinterMargin: Integer); //the units of TRichEdit.PageRect are pixels, units of PrinterMargin are mm var PrinterHeight, PrinterWidth: Integer; LogPixels, PrinterTopLeft: TPoint; PageRect: TRect; Handle: HDC; begin Handle := Printer.Handle; LogPixels := Point(GetDeviceCaps(Handle, LOGPIXELSX), GetDeviceCaps(Handle, LOGPIXELSY)); PrinterTopLeft := Point(GetDeviceCaps(Handle, PHYSICALOFFSETX), GetDeviceCaps(Handle, PHYSICALOFFSETY)); PrinterWidth := Printer.PageWidth; PrinterHeight := Printer.PageHeight; PageRect.Left := Max(0, Round(PrinterMargin*LogPixels.X/25.4) - PrinterTopLeft.X); PageRect.Top := Max(0, Round(PrinterMargin*LogPixels.Y/25.4) - PrinterTopLeft.Y); PageRect.Right := PrinterWidth-PageRect.Left; PageRect.Bottom := PrinterHeight-PageRect.Top; if (PageRect.Left>=PageRect.Right) or (PageRect.Top>=PageRect.Bottom) then //the margins are too big PageRect := Rect(0, 0, 0, 0); RichEdit.PageRect := PageRect; RichEdit.Print(Caption); end;
-
Thanks Peter. I applied your suggestions (I did not have the Newpage, because this richedit text will never exceed 1 page). However, checking if nextchar <=fmtRange.chrg.cpMin allows me to abort printing but it does not tell me what is the error, why that happens.
-
Hi I have had extremely bad experiences upgrading from one minor version to another. I have these questions, if anyone is willing to help. 1. if I upgrade from, in this case, 11.2 to 11.3, after upgrading do I need to re-install all 3rd party products and my own packages? 2. Do I need to UNINSTALL the old version, or is it better to NOT uninstall it? From the windows for the installation I get contradictory suggestions: it first says "you need to uninstall", but then the NO radio button is checked by default
-
Uwe that "the vast majority had no problems with this update" is of no sonsolation to me. Now it has become completely unworkable. It freezes all the time, with no apparent pattern.
-
QED.. I had no Getit packages. But after installing 11.3, no the IDE freezes like crazy. Once if I clic File, another if I click Search, at times if i am just moving the cursor around. Does anybody have an idea on hoiw to get rid of this annoyance?
-
Hola Does anybody have experience with E-Payment processing software for Delphi? Any suggestions for a good good software for Delphi (11)? How does it work, once the software is integrated into the APP: is it a one time licence or does the developer have to pay for each end-user that uses the app. I am 100% new to this field. Thanks Enrico
-
Thank you very much, FPiette. I have two questions, if you will 1. The customer (the restaurant) to use this type of API requires https on the PC (server) in the restaurant? 2. Aside from entering the credit card data manually in the POS App, are there ways to scan/read these data and send them to the API?
-
David. 1. As for the country, I did write "The client that asked me, in Mexico,...." 2. I think there is a fundamental misunderstanding caused by the word POS. I never meant POS terminals. I mean a POS application: where the waiter enters the order. At the end, when the customer pays the cashier scans the credit card with the bank provided terminal, and then has to duplicate the data entering in the database of the app (e.g "payd by visa"). He would like to enter or read the credit card data (in some ways, maybe even with some type of scanner) directly in the application (that would send the data to a real payment-processing site on the web), so to avoid duplication. If something like this is not possible, I will tell my client "sorry, that is beyond my reach".
-
Embarcadero istself claims a "Rapidly Deploy Blazing Fast Payment Solutions On Windows", https://blogs.embarcadero.com/rapidly-deploy-blazing-fast-payment-solutions-on-windows/ but when you try to access the site it returns a 404 error. https://getitnow.embarcadero.com/InPay-20.0.7582/
-
Hola David. The field is the subject and the content of the post: E-Payment processing software for Delphi. Perhaps is not the right wording, but what I was trying to get suggestions/hints about is how to allow a POS application to process a payment made with credit/debit cards. I found something, for example Stripe and a Delphi wrapper (https://github.com/gmurt/ksStripe). It appears that one could add that payment processing library to an application. I do not intend to develop myself a Stripe-like software, but use it or something similar in a Delphi 11 app. I have developed my own application, should I suggest to my client to buy Square?. The client that asked me, in Mexico, did so because he had seen it in another restaurant. I assume then that it can be done. I was asking for some help on the "basics" where to start from.