Jump to content

JohnLM

Members
  • Content Count

    218
  • Joined

  • Last visited

Everything posted by JohnLM

  1. JohnLM

    Delphi 12 entry in start menu

    This is not an answer solution to your issue, but I have noticed that this is typical Windows trying to help you by putting commonly used apps that the user launches, eventually go to the start menu. I do not know what the app's launch count is that will trigger adding it to the start menu. But I am sure there is a setting somewhere to turn that feature off.
  2. JohnLM

    Removing String

    Here is my version of a (string) removal for this practice: function StrRemove(s: string; StrToRemove:string): string; begin while pos(strToRemove,s,1) <> 0 do begin // recursive if pos(strToRemove, s,1) > 0 then delete(s,pos(strToRemove,s,1),length(strToRemove)); end; result := s; end; // call with var s: string; begin s := 'This is (string) which (string) need to (remove).'; s := StrRemove(s,'(string)'); s := StrRemove(s,'(remove)'); end;
  3. JohnLM

    Removing String

    Serge_G's routine works, including when multiples of, i.e., (string) .. (string) But it does not remove the extra spaces. And Trim() does not remove the spaces in-between char/strings unless the original string includes spaces at the first and last position, i.e., Trim(' This is (string) which (string) need to (remove) ') --- works Trim('This is (string) which (string) need to (remove)') --- fails So, the routine would require more work/additional code.
  4. JohnLM

    Removing String

    ..or here.
  5. After receiving my windows activation key for my new tablet, and after it "upgraded" my windows 10, to "Windows 10 2022 Update | Version 22H2" I was no longer able to access the windows sytem settings app. It sometimes pops up as a blank blue dialogbox with the familiar gear in the center, and then closes. For instance, when I right-click the desktop, and select 'Display settings' I get this error message (after the blue dialog box with the gear pops up and closes). "This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page." Or, when I try to open the Settings app directly, or Windows key+I, or from any place or method of activating Settings, I get this (below) and then it closes in a second or two. The following are things I have tried, I believe are all that I have tried so far: 1. open cmd and enter - sfc /scannow 2. open cmd and enter - Dism /Online /Cleanup-Image /CheckHealth 3. open cmd and enter - Dism /Online /Cleanup-Image /ScanHealth 4. open cmd and enter - Dism /Online /Cleanup-Image /RestoreHealth 5. open powershell and enter - * PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *immersivecontrolpanel*).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}" 6. open powershell and enter - * Get-AppXPackage -AllUsers -Name windows.immersivecontrolpanel | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose} 7. open powershell and enter - * Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" -verbose} I've also tried a few of the registry hacks but they did not help. So now I am wondering what else can I do. Something in the 22H2 messed up the Settings's app's association. And I can't run a Settings Repair because I have to be in Settings to do that. Does anyone else have suggestions for me to try. I can create a system restore point and then try your suggestion(s). TIA
  6. Update. . . re windows boot up problems is now resolved. All is back to normal. I managed to get a system Restore point from a dos prompt and am now back to the previous windows 10 22H2 state prior to my removing most of the updates. Oh well. At least I'm back up and running. I'm glad I made the choice to create a Restore point after all since I could not get Macrium to restore an image. I will have to figure that one out.
  7. Update. . . on removing Windows updates via Powershell Using the following PS command to do the following: 1. wmic qfe list brief/format:table -- will show a table format view of all Updates in KBnnnnnnn, ie, KB5032005 2. wusa /uninstall /kb:5032005 -- will remove an update -- note: I follow this with a restart, but some KB's will inform you to restart I managed to remove the following KB's: (5032005, 5031988, 5011048 and (5015684=security update)) there were two more but they were not removed yet: (5031539 and 5032392) -- these were not removed due to an endless loop of restarting from the KB5015684 removal) So after performing most of the above KB's, I am now stuck (after the initial system Restart) in an endless loop of: 1. Preparing Automatic Repair startup screen 2. Diagnosing your pc 3. Blue Screen Automatic Repair -> Your PC did not start correctly -> [Restart] or [Advanced options]* * to try other options to repair your pc. So at this stage, my Chuwi Hi10 X tablet is unusable--it will not boot up into windows.
  8. @ Nigel, I forgot all about that, thanks !
  9. No, not yet, but I will be looking into that next after I image and create a restore point. Thanks for the link.
  10. Thanks for that link. I tried almost all the selections (once created as a folder control applet on the desktop) and they work the same as in the Control Panel. And the ones that do not work in the Control Panel are the same ones that call the Settings app and close immediately. For what it is worth mentioning. . . { For quick testing of this issue, I use the step mentioned in my first post where I right-click on the desktop area and select 'Display settings'. The win+key command to bring up the change screen resolution is win+R+'ms-settings:display'. without the quotes... thus, win+R and enter ms-settings:display. (I'm sure there is a way to call those commands in a cmd dos window but I don't know the proper syntax for it. Then I would make a .bat file and easily call it during testing/debug.) 1. works in windows 10 home on my HP laptop 2. edit: does not work in windows 7 home premium on my Dell laptop -- win7 did not have this ms-xxx:xxx syntax option for bringing up windows applets. 3. does not work in windows 10 Enterprse on my Chuwi tablet }
  11. It had occurred to me that I could also take out my Windows 10 Home HP laptop (model stream 14" with D11.2 and no Settings issue) and run some comparison tests while debugging the issues with the Chuwi tablet. The settings dialog box on your left is what used to come up on the tablet under win10 before the upgrade/update I performed on 11/16/23. The control panel on the right (in your image) is the one that always comes up if I use the start menu or win+r+'control panel' on HP laptop, both* come up. * Settings is what Control Panel was but enhanced, but people still call it control panel, I guess.
  12. Fail... @ FPiette - in win10, the Control Panel is on the desktop. The way I determine two distinct folder locations (and file/app kind/type/etc) is to bring up the app's Properties and select [open folder location]. From there I can look at the file size, date, and so on. 1. using your suggestion to use the old 'control panel' is to press Win+R, enter 'control' and it opens the Control Panel 2. When I right-click on its icon in the Taskbar and then right-click on the menu item 'Control Panel' to pull up the Properties, the Target location points to the Desktop. 3. I get the same results when I select/click on [open file location] it opens Explorer to the desktop and points to 'Control Panel'. Note, I've also tried win+R and enter 'control.exe' and received the same results. So it appears the there is only one control panel version in win10 enterprise.
  13. update... i've also tried adding a new user account. . . 1. create a restore point 2. add a new user account via CMD prompt(s): net user user2 password_xxxxx /add net localgroup administrators user2 /add 3. restart 4. log into new user2 account 5. access the Settings app, failed! I have the same situation as posted above, the Settings dialog box with the gear pops up and closes.
  14. I was going to ask, how do I undo an update, but it requires the Settings app. Arh!! Settings just closes. Is there any other way to undo an Update?
  15. Still researching this issue... I booted Windows into safe mode, and Settings still not loading.
  16. @ fpiette - the following are the specs: Windows 10 Enterprise [10.0.19045.3693 as of 11/16/2023] Chuwi Hi10 X 10.1" / 128GB SSD / 6GB Ram / 1920x1200 pixels tablet Intel Celeron N4120 (Gemini Lake) 1.10GHz 4-cores cpu with UDH Graphics 600 BIOS: UEFI * I purchased the tablet Sept/2023, but did not open and use it until 11/11/2023. Windows ver was at 10.01.19045.3570 and during that time right up to 11/15. * Then, I activated Windows on 11/16. * And then it proceeded to upgrade to 22H2, which I believe is the final version for win10. * Shortly after that, is when I discovered that I could no longer launch the Settings app.
  17. In my searches to date, I have read that this same issue is also in Windows 11 and users are suffering from this same issue. And, considering that I was affected by this on this tablet, there is a good chance that I will continue to have this issue in win11.
  18. For some time I was wondering how I could create a nice output from data I have. One day I was looking at some learning video or website--I can't remember. And I saw how some easily create an output that included text and images. If I recall, he used HTML at the time, but I'm not sure since it was a long time ago. Then, today, I was looking at some items in the GetIt portion of the welcome screen. Then, moments later I decided to click on the 'getit package manager' and that's when it hit me, again, the idea of creating a custom output view similar to that. So, I was wondering if I could create something similar in Delphi with the built-in components I already have--be it HTML code (howto) or a combination of components already in Delphi, for VCL and FMX/Mobile. * This D12 getit pkg mgr snippet taking from my tablet and down-resized 1920x1200, 50% * notice the output on the right side pane area, that is the design output I am seeking to create Does anyone have any suggestions on how I can proceed in this endeavor? What are your methods? TIA
  19. @ Alexander S - Thanks for your reply. I will look into your second suggestion. ** The TControlList ** I checked out the TControlList and found a video by Alister and he gave a brief tutorial using a TClientDataset. I copied to code snippet from the screen in the video and tried and it worked. It was a nice output. I just need to play around with it to get a better feel for my needs and what I may use it for in the future. So thanks, Alister.
  20. JohnLM

    Dellphi 12: IDE's F6 Search box still faulty

    I use these little-known keyboard secrets... On my laptop, I use shift+insert On my bluetooth keyboard, since I don't have the [insert] key, I use CTRL+Shift+V Both methods work for me in XE7, 11.2 and on my laptop with windows 7 And on my Chuwi Hi10X win10 tablet, these methods work in 11.2 and 12.0 using a bluetooth keyboard with Ctrl+Shift+V
  21. JohnLM

    Pulling all files and folder names into a list

    update.. I've also compiled the test app in Delphi 11 and 12 on my Chuwi Hi10X tablet. 11.2 works fine, but 12.0 hit or miss. Sometimes the machine locks up, other times the window (the memo) is blank. Makes no sense to me, but I'm late for work and will have to figure it out later.
  22. Specs: win10, delphi 12, VCL app design I am searching for the best or optimum way of pulling all filenames (and folder names) from my current tablet. The hdd is an SSD. In the past, I used to use a dos command and run dir c:\*.* /A x y z >h:\cdrive.txt and save that as a text file to archive. But its been a long time since I've performed this and can't remember the exact parameters I used to use. That was windows XP and early windows 7 desktop pc. Now I want to do the same in a dos window, but I see the command seems to have changed and/or new ones added since. This is windows 10 now. I would use Delphi command instead but I'm not savy in that area. So I want to continue doing it the dos way if possible, or I would like to try both methods: dos and delphi. The reason I've used the dos method is because it is the fastest. There was a command to turn off screen updates and it would fly, 1, 2, 3 and it was done. TIA
  23. JohnLM

    Pulling all files and folder names into a list

    I have updated the source code to include the time info (in the sec 4 portions of the source code, in the previous post above). Here is a demo of the final output: 1/27/2016 12:11:27 AM | Project2.cfg | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Project2.dof | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Project2.dpr | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Project2.exe | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Project2.res | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Unit1.dcu | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Unit1.ddp | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Unit1.dfm | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:27 AM | Unit1.pas | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:28 AM | Unit1.~ddp | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:28 AM | Unit1.~dfm | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:28 AM | Unit1.~pas | I:\delphi\d7\Activity List\ver01 1/27/2016 12:11:32 AM | Project1.dof | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:32 AM | Project1.dpr | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:32 AM | hdd.s.exe | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Project1.res | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Unit1.dcu | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Unit1.dfm | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Unit1.pas | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Unit1.~dfm | I:\delphi\d7\hdd serial\v01 1/27/2016 12:11:33 AM | Unit1.~pas | I:\delphi\d7\hdd serial\v01 7/10/2016 11:10:03 PM | Unit2.fmx.~1~ | I:\delphi\xe7\FMX\fishfacts\v01\__history 7/10/2016 11:10:03 PM | Unit2.vlb | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:08 PM | Project1.dpr | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:08 PM | Project1.dproj | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:24 PM | Unit2.dcu | I:\delphi\xe7\FMX\fishfacts\v01\Win32\Debug 7/10/2016 11:10:24 PM | Project1.exe | I:\delphi\xe7\FMX\fishfacts\v01\Win32\Debug 7/10/2016 11:10:23 PM | Project1.res | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:03 PM | Unit2.pas | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:03 PM | Unit2.fmx | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:10:08 PM | Project1.dproj.local | I:\delphi\xe7\FMX\fishfacts\v01 7/10/2016 11:17:48 PM | Project1.identcache | I:\delphi\xe7\FMX\fishfacts\v01 9/16/2017 11:15:18 PM | readme_KEEP.txt | I:\delphi\xe7\FMX\fishfacts\v01 11/13/2016 1:00:08 PM | data_Notes20161113sun1259pm.zi | I:\delphi\misc 1/13/2019 1:47:50 PM | data_Notes20190113sun0139pm.zi | I:\delphi\misc
  24. JohnLM

    Pulling all files and folder names into a list

    I now have the date included. Again, this is not efficient, and with every new piece I add to the code, it gets slower, but still works. Below is the updated source code with added functions. Next, I will add the filename timestamp... uses strutils; // sec 1 function GetFileCDateTime(FileName: String): TDateTime; begin GetFileCDateTime := 0; If (FileName <> '') and (FileExists(FileName) = True) then begin GetFileCDateTime := TFile.GetCreationTime(FileName); end; end; // sec 2 function padspaceRT(S: string; Len: Integer): string; begin // this is my custom-made string padder, it insers spaces to a given length - its prob the slowest part and can be enhanced i'm sure. s := midstr(s,1,len); result := S; // give it a value right away. while Length(Result) < Len do Result := Result + ' '; end; // sec 3 function padspaceLF(S: string; Len: Integer): string; begin result := S; // give it a value right away. while Length(Result) < Len do Result := ' ' + Result; end; // sec 4 procedure tform1.findfiles(list: tstrings); begin list.Clear; var sw := TStopwatch.StartNew; var fname, fdate, ftime: string; var FileARR := TDirectory.GetFiles(eb1.text, '*', TSearchOption.soAllDirectories); var DateARR := tdirectory.GetCreationTime(eb1.Text); for fname in fileARR do begin fdate := datetostr(getfilecdatetime(fname)); ftime := timetostr(getfilecdatetime(fname)); list.Add(padspaceLF(fdate,12) + ' ' + padspaceLF(ftime,12) + ' | ' + padspaceRT(tpath.GetFileName(fname),30) +' | ' + TPath.GetDirectoryName(fname)); end; st1.Caption := Format('%d Files, %d ms, (%f s) ', [Length(FileARR), sw.ElapsedMilliseconds, sw.ElapsedMilliseconds / 1000]); end; // sec 5 procedure TForm1.btnPullClick(Sender: TObject); begin m1.Lines.Clear; // tmemo m1.Lines.BeginUpdate; // for speed but prob not necessary try findfiles(m1.Lines); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; m1.Lines.EndUpdate; end;
  25. JohnLM

    Pulling all files and folder names into a list

    After some mods and additions to the code I managed to get the filenames and folder names to display. The only problem I am having is with getting the date, mod date, and time. I believe it is TDirectory.GetCreationDate() My updated code snippet, below. I'm sure it can be enhanced better and/or less, but it works. uses strutils; function padspaceRT(S: string; Len: Integer): string; begin // this is my custom-made string padder, it insers spaces to a given length - its prob the slowest part and can be enhanced i'm sure. s := midstr(s,1,len); result := S; // give it a value right away. while Length(Result) < Len do Result := Result + ' '; end; procedure tform1.findfiles(list: tstrings); begin list.Clear; var sw := TStopwatch.StartNew; var fname: string; var FileARR := TDirectory.GetFiles(eb1.text, '*', TSearchOption.soAllDirectories); var DateARR := tdirectory.GetCreationTime(eb1.Text); for fname in fileARR do begin list.Add(padspaceRT(tpath.GetFileName(fname),30) +' -- ' + TPath.GetDirectoryName(fname)); end; list.add(Format('%d Files, %d ms', [Length(FileARR), sw.ElapsedMilliseconds])); end; procedure TForm1.btnPullClick(Sender: TObject); begin m1.Lines.Clear; // tmemo m1.Lines.BeginUpdate; // for speed but prob not necessary try findfiles(m1.Lines); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; m1.Lines.EndUpdate; end;
×