Jump to content

alogrep

Members
  • Content Count

    192
  • Joined

  • Last visited

Everything posted by alogrep

  1. Hi. I found these 3 lines thata semm VERY suspicious to me in Processmonitor. Is there something wrong with my delphi 12 installations? 04:14:27.0519775 p. m. Explorer.EXE 9964 RegQueryValue HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe NAME NOT FOUND Length: 16 04:14:27.0526399 p. m. Explorer.EXE 9964 CreateFileMapping C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READ 04:14:27.0902689 p. m. Explorer.EXE 9964 CreateFileMapping C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe.config FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READ
  2. HI Compiling the first project in delphi 12, I get this error [dcc32 Fatal Error] : F2051 Unit Vcl.ExtDlgs was compiled with a different version of Vcl.Dialogs.TOpenDialog But Vcl.Dialogs.TOpenDialog.pas does NOT EXISTS? dir \Vcl.Dialogs.TOpenDialog.pas /s Volume in drive C is Acer Volume Serial Number is A295-B72F File Not Found What am I missing?
  3. HI In the following code I put 2 breakpoints at the beginning of Thread.Create and of Thread.Destroy. I noticed that in all cases except one the sequence Crate/Destroy is executed in the correct order. But in one case, Destroy is called twice in a row. Does anybody have an idea as to why? Constructor SendThread.Create(afmods:modslist; atablename: string;uniquenumber: int64;asavedir,adbase: string); begin inherited create(false); FreeOnTerminate:=true; fmods:=afmods; tablename:=atablename; uniq:=uniquenumber; dbase:=adbase; savedir:=asavedir; sstream:=TStringstream.create; end; Destructor SendThread.Destroy; begin sstream.free; inherited Destroy; end; procedure SendThread.Execute; var s,last1: string; l,i,n,modindex: integer; done: boolean; t: textfile; begin if length(fmods)<=0 then exit; modindex:=getmodindex(inttostr(uniq),fmods); with fmods[modindex] do begin // s:=format('%-11s',[fmods[high(fmods)].val]); // sStream.writestring(s); for l:=0 to high(mods) do begin sstream.writestring(format('%4s',[inttostr(mods[l].fieldpos)])); sstream.writestring(format('%10d',[length(mods[l].val)])); sStream.writestring(mods[l].val); END; mods:=Nil; end; sStream.position:=0; s:=Format('%.*d',[13, uniq]); s:= savedir+'\'+s+'$'+trim(copy(dbase,Lastdelimiter('\',dbase)+1,10))+'-'+tablename+'.db'; sStream.savetofile(s); last1:=inttostr(Lastuniquenumber); sStream.clear; sstream.writestring(format('%4s',['0'])); sstream.writestring(format('%10d',[length(last1)])); sStream.writestring(last1); s:=Format('%.*d',[13, uniq]); s:= savedir+'\'+s+'$pos-'+tablename+'.db'; sStream.savetofile(s); end;
  4. alogrep

    IDE stopped saving to *.~

    Hi I noticed that the IDE (suddemnly) does not save the current Unit to the *.~ when I edit and save a Unit. What should I do to restore this feature? Thanks
  5. HI I installed nexusdb into Delphi 12, and I got the error shown in the jpg attached. Nexusdb asked me to uncheck the package in Install Packages and see what happens. I guess that was to decide if the error was a Nexus one or a Delphi one. But when I uncheck the package, the check mark disappears alright, I press OK, restart the IDE , I get the same error and the package is still CHECKED. Somebody can help with this? Is there a manual way to ensure the unchecked package remains unchecked?
  6. alogrep

    Delphi 12 IDE: unchecking a component is NOT SAVED

    Thanks Remy Lebeau. Your suggestion worked.
  7. alogrep

    IDE stopped saving to *.~

    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.
  8. 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./
  9. 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.
  10. 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?
  11. alogrep

    IDE stopped saving to *.~

    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?
  12. alogrep

    IDE stopped saving to *.~

    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!!!!
  13. alogrep

    IDE stopped saving to *.~

    Thanks. But I cannot find "Create backup fiels" (see attached please)
  14. 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?
  15. 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.
  16. alogrep

    New mystery of freezing IDE.

    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
  17. alogrep

    New mystery of freezing IDE.

    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
  18. alogrep

    New mystery of freezing IDE.

    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.
  19. 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;
  20. alogrep

    Richedit printing code gets stuck in 11.3.

    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);
  21. alogrep

    Richedit printing code gets stuck in 11.3.

    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;
  22. alogrep

    Richedit printing code gets stuck in 11.3.

    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.
  23. alogrep

    Upgrading from 11.2 to 11.3

    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
  24. alogrep

    Upgrading from 11.2 to 11.3

    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.
×