Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    How to open a file in the already running IDE?

    cest la vie, mon cherry!
  2. programmerdelphi2k

    How to open a file in the already running IDE?

    sorry, on copy I did wrong ... but the result is the same = WORKS! LWinReg := TRegistry.Create; try LWinReg.RootKey := HKEY_CURRENT_USER; if LWinReg.KeyExists('SOFTWARE\Embarcadero\BDS\22.0') then begin if LWinReg.OpenKeyReadOnly('SOFTWARE\Embarcadero\BDS\22.0') then
  3. programmerdelphi2k

    Html Help: Ctrl+F not working

    it would be because "Ctrl+F" is a "Search on Editor-code"?
  4. programmerdelphi2k

    How to open a file in the already running IDE?

    according with "Raymond Chen" MVP MS, it's ShellExecute is a "little box" very complicate to understand an easy to use!
  5. programmerdelphi2k

    How to open a file in the already running IDE?

    nop! LOperation := PWideChar('open'); LExec := PWideChar('C:\RADStudio\RX112\bin\BDSLauncher.exe C:\RADStudio\RX112\bin\BDS.EXE /np D:\myfile.pas '); // DOESNT WORKS TOO! at least here! LParams := ''; // PWideChar('d:\myfile.pas'); LDirWork := ''; // PWideChar('d:\'); // ShellExecute(Handle, LOperation, LExec, LParams, LDirWork, SW_SHOWNORMAL)
  6. programmerdelphi2k

    How to open a file in the already running IDE?

    nop! procedure TForm1.Button2Click(Sender: TObject); var LOperation: PWideChar; LExec : PWideChar; LParams : PWideChar; LDirWork : PWideChar; begin LOperation := PWideChar('open'); LExec := PWideChar('C:\RADStudio\RX112\bin\bdslauncher.exe BDS.EXE /np d:\myfile.pas'); LParams := ''; // PWideChar('d:\myfile.pas'); LDirWork := ''; // PWideChar('d:\'); // ShellExecute(Handle, LOperation, LExec, LParams, LDirWork, SW_SHOWNORMAL) end; but this works with IDE on memory or not! procedure TForm1.Button1Click(Sender: TObject); var LShExecInfo : TShellExecuteInfo; LShExecInfoSize: NativeUInt; LWinReg : TRegistry; LHKEY : HKEY; // LKeyString : string; begin // "App"="c:\\radstudio\\rx112\\bin\\bds.exe" // C:\RADStudio\RX112\bin\bds.exe "-pDelphi" -np LHKEY := 0; LWinReg := TRegistry.Create; try if LWinReg.KeyExists('HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0') then begin LWinReg.OpenKeyReadOnly('HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0'); LHKEY := LWinReg.CurrentKey; // LKeyString := LWinReg.ReadString('App'); end; // LShExecInfoSize := SizeOf(LShExecInfo); // 60... // ZeroMemory(@LShExecInfo, LShExecInfoSize); // LShExecInfo.cbSize := SizeOf(LShExecInfo); LShExecInfo.fMask := SEE_MASK_CLASSNAME; // or SEE_MASK_CLASSKEY; LShExecInfo.lpFile := PChar('d:\myfile.pas'); LShExecInfo.lpClass := '.pas'; LShExecInfo.hkeyClass := LHKEY; LShExecInfo.nShow := SW_SHOWNORMAL; // ShellExecuteEx(@LShExecInfo); finally LWinReg.Free; end; end;
  7. programmerdelphi2k

    How to open a file in the already running IDE?

    in my test, would be necessary "Create a process" or verify if the "Process X" in opened on memory"... then, use this ID to open your file!
  8. programmerdelphi2k

    How to open a file in the already running IDE?

    LOperation := PWideChar('open'); LExec := PWideChar('C:\RADStudio\RX112\bin\bdslauncher.exe'); // dont works for here, nothing is opened!!! no error at all! LParams := PWideChar('d:\myfile.pas'); LDirWork := ''; // PWideChar('d:\'); // ShellExecute(Handle, LOperation, LExec, LParams, LDirWork, SW_SHOWNORMAL)
  9. programmerdelphi2k

    How to open a file in the already running IDE?

    LShExecInfo.hkeyClass == use Registry definition... maybe you can use the key where is definide the "exe from RAD" desired!!! --> try some like this!
  10. programmerdelphi2k

    How to open a file in the already running IDE?

    use "o BDS path\exe" as your first param, and the file name .pas as second! then, you "force" use only "bdsXXX" to open file.pas! dont forget: qualify the paths!
  11. programmerdelphi2k

    How to open a file in the already running IDE?

    here, a code from @David Heffernan on StackOverFlow that works like a charm https://stackoverflow.com/questions/16941455/how-do-i-open-a-file-with-the-default-text-editor procedure TForm1.Button1Click(Sender: TObject); var sei: TShellExecuteInfo; begin ZeroMemory(@sei, SizeOf(sei)); sei.cbSize := SizeOf(sei); sei.fMask := SEE_MASK_CLASSNAME; sei.lpFile := PChar('d:\myfile.pas'); sei.lpClass := '.pas'; sei.nShow := SW_SHOWNORMAL; ShellExecuteEx(@sei); end; or just: PChar or PWideChar ? procedure TForm1.Button2Click(Sender: TObject); var LOperation: PWideChar; LExec : PWideChar; LParams : PWideChar; LDirWork : PWideChar; begin LOperation := PWideChar('open'); LExec := PWideChar('d:\myfile.pas'); LParams := PWideChar(''); LDirWork := PWideChar('d:\'); // ShellExecute(Handle, LOperation, LExec, LParams, LDirWork, SW_SHOWNORMAL) end;
  12. programmerdelphi2k

    How to open a file in the already running IDE?

    I think that it's not problem with your code, but with REGISTRY definitions to RAD Studio! I think that you needs pay attention if your "IDE" is registering "* files using by RAD" in Tools->IDE->File Associaton = * I once had a problem that when I clicked on a ".pas" file (for example), the O.S. insisted on opening a new session for a new "IDE RAD Studio", even with the option above set to "all files associated with RAD Studio"... In short, I had to "deselect" and "select" the above option again, in order for the REGISTRY to be updated! From there, everything went back to working as expected! So maybe this can help you with this task! UnSelect and Re-Select again the option and try your tool!
  13. programmerdelphi2k

    Tab key in the IDE

    it would be this: RAD 11.2 Alexandria! if not, try this: on RAD 10.4 save your profile (whole) ... using "migrationtool.exe" on RAD 11 do the same, and compare the values using "Beyond Compare" -- Edit->Compare->Beyond Compare
  14. programmerdelphi2k

    Create multiple instances of tApplication with multiple MainThreads?

    maybe yes, maybe no! you can use a specifc "query" to filter your data before bind it to cxGrid! the query-return will so quick than your system! you can works in "offline" mode (cache) but I think that your better choice would be contact DevExpress for more details!
  15. programmerdelphi2k

    Keep getting Expected and identifier but received VAR same for IN and Contains

    my fault: change " for var in AFilenames do" by "for var F in AFilenames do" xxx.AddFilenames( [ 'name1', 'name2', etc... ] );
  16. programmerdelphi2k

    Create multiple instances of tApplication with multiple MainThreads?

    maybe be better review your "query" parameters to avoid excessive records on cxGrid, or send it in "batch" to screen! cxGrid can define how much records can be loaded by time!
  17. programmerdelphi2k

    problem on update sdk ndk in delphi 11

    I prefere manual update, and works!
  18. programmerdelphi2k

    VCL menu control needed

  19. programmerdelphi2k

    How to handle/close FreeReport's Preview? (D7)

    It would be some like this: {$R *.dfm} uses frxClass, frxPreview; var MyFastReport : TfrxReport; MyFastPreview: TfrxPreview; procedure TForm1.FormCreate(Sender: TObject); begin MyFastReport := TfrxReport.Create(nil); // creating on create-form for quick access... MyFastPreview := TfrxPreview.Create(nil); end; procedure TForm1.FormDestroy(Sender: TObject); begin MyFastPreview.Free; // destroying on form-destroy! MyFastReport.Free; end; procedure TForm1.BtnPreparePreviewClick(Sender: TObject); begin if (MyFastReport <> nil) and (MyFastPreview <> nil) then begin MyFastPreview.Parent := Panel1; // show the "Preview" into "Panel1" MyFastPreview.Align := TAlign.alClient; // // loading a saved FR file... for quick tests! MyFastReport.LoadFromFile('D:\RADRX112Tests\__TEMP\Untitled.fr3'); // // assigning and preparing to show report on Preview... MyFastReport.Preview := MyFastPreview; // MyFastReport.PrepareReport(true); end; end; procedure TForm1.BtnClosePreviewClick(Sender: TObject); begin MyFastReport.Preview := nil; // unAssigning Preview MyFastPreview.Parent := nil; end; end.
  20. programmerdelphi2k

    problem on update sdk ndk in delphi 11

    in fact, the Android SDK/NDK is not installed, on exact word sense! it is just "copyed" to your disk! this said, you can copy from any other pc!!! now, you can update it usando command line: skdmanager.bat is in "<<sdk root>>"\command-line\bin" skdmanager.bat --sdk_root=<<Path root of your Android SDK>> "<< pacakge names to update or install" --list <--- for all packages avaliable on Google) --list_installed <--- for all packages installed in your computer sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --list for example: install/update/uninstall 2 packages named: "build-tools;31.0.0" and "cmdline-tools;v5" sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> "build-tools;31.0.0" "cmdline-tools;v5" sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --update "build-tools;31.0.0" "cmdline-tools;v5" sdkmanager.bat --sdk_root=<<Path root of your Android SDK>> --uninstall "build-tools;31.0.0" "cmdline-tools;v5" you can download Android Studio if you dont have your NDK!!! later, just copy NDK folder for you disk (in any folder than desire) if you want uninstall Android Studio!!! because it's not necessary have it installed! after this, just config your RAD IDE!!! to updates your SDK/NDK just use the command-line above!
  21. programmerdelphi2k

    How do I delete a row in a database with FireDAC?

    if can use "int64"... starting in min-Int64 to max-Int64! -9.223.372.036.854.775.808 +1, +1, +1... to +9.223.372.036.854.775.807 = 18.... at least, your brain can rest a little longer! ( I think ... but if you're ZKeeZOfranic.. .
  22. programmerdelphi2k

    How to handle/close FreeReport's Preview? (D7)

    please show your code to create it and say: How would you like to procede?
  23. programmerdelphi2k

    Find, Replace and Save

    again! I can say to you this: my code find "ANY NUMBER OF OCCORRENCES" (expressed in BYTES), and I can do the CHANGES for ANY PATTERN (in BYTES), since that: BYTES FOUND IS SAME SIZE THE PATTERN SIZE PATTERN SIZE MINOR THAN FILE SIZE! DOES NOT MATTER THE FILE SIZE! JUST 1 PASS!!! I dont load it on memory!!! just the bytes (buffer) necessary to read it! this buffer can have any size! my "changes" is done in the SAME FILE!!! -- of course, for avoid any "problems", do the backup before! why I dont do it: because the file can have 1Byte or 1TERABytes... then, because that I dont do backup on code! but you CAN DO IT!
  24. programmerdelphi2k

    How to handle/close FreeReport's Preview? (D7)

    maybe help you: https://www.fast-report.com/public_download/docs/FRVCL/online/en/ProgrammerManual/en-US/Working_with_TfrxReport_component/Creating_a_custom_preview_window.html https://www.fast-report.com/public_download/docs/FRVCL/online/en/ProgrammerManual/en-US/Working_with_TfrxReport_component/Creating_a_report_form_from_code.html
  25. programmerdelphi2k

    Find, Replace and Save

    no, no, no! I can do any number of searches, no matter what size pattern is used! If there are 1000 occurrences within the file, I can find them all and replace them! It doesn't matter the size of the "pattern" I'm looking for! The only restriction is: the pattern size must be smaller than the file size!
×