Jump to content

PeterBelow

Members
  • Content Count

    447
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by PeterBelow

  1. PeterBelow

    activex word97 word

    The problem is likely the huge jump in the Word versions. Newer Word versions use a different document format and plainly refuse to edit documents in ancient formats like Word97, although you can still view them (my latest version installed is Word 2016, so still much older than Word365). You may have to rebuild your template dot with the new Word version to get it to work as you want.
  2. PeterBelow

    How do I tab into a TDBRadioGroup ?

    A radio group, by its very nature, must have one of the options checked. If you need to indicate that none of your two options applies then that has to be added as a third option that is checked as default. What type of database field have you tied the group to?
  3. PeterBelow

    Integer Overflow - Exception

    This may not do what you expect it to do. ALength may be int64 but the compiler will calculate the right-hand side using a smaller integer type into which both the constant 2 and errorlevel fit and only extend the result to int64 before storing it into Alength. So the calculation may well overflow the range of the type used for the calculation, and since D12 has enabled overflow and range checks by default you get an exception. Change the code to Alength := int64(2) shl errorlevel; to force the use of int64 for the calculation.
  4. The Install packages dialog affects the current project only if you have one open, and the IDE basic configuration if you have no project open. Changing the latter will not affect any projects you created before, though. To get rid of the package for good you have to edit the registry key HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\21.0\Known Packages (for D10) and rename the items for the dclbind*.bpl packages or move them top the "Disabled Packages" key.
  5. PeterBelow

    Preventing and allowing things to happen in a Thread???

    Put all controls on the form on a client-aligned panel and then simply disable the panel while the background thread is active. Also use a handler for the OnCloseQuery event to prevent closing of the app while the thread is running. If you have a main menu bar tie all menu items to actions and disable the actionlist while the thread is running. Just don't forget to enable all the stuff again when the thread is done.
  6. PeterBelow

    debug message

    Delphi forms tend to recreate their window handle at the drop of a hat. So move the DragAcceptFiles calls from the events to overridden CreateWnd and DestroyWnd methods, that makes sure the handle changes are properly handled.
  7. See this blog post. Sometimes part of the pages work, but getit is the least stable. If you have it try to installing from the ISO.
  8. PeterBelow

    Delphi 12 Welcome Page: Open Recent

    You know that this forum is not the right place for feature requests, do you? The replacement for Embarcadero's Quality Portal will hopefully be online soon, post a request there.
  9. PeterBelow

    Delphi 12 Application showing two windows on the taskbar?

    Check the project dpr file. Have you set Application.MainformOnTaskbar to false there? Does the form class override the CreateParams method or CreateWnd?
  10. PeterBelow

    Procedure/Function Commenting..

    It might be worth noting that XML documentation tags also work inside a normal Delphi comment (enclosed in braces {}) instead of these horrible triple slash comments copied from C# along with the XML tags themselves. Much easier to maintain in my opinion if a tag content spans several lines.
  11. PeterBelow

    Delphi 12 Application showing two windows on the taskbar?

    The posted image is not large enough to make out any details unfortunately. Is this a MDI application by any chance? That is an area in the VCL where some major changes were made.
  12. PeterBelow

    Testing a Semaphore??

    You call GetLastError after the Create call. It will return ERROR_ALREADY_EXISTS if the named semaphore already exists. That also applies to other named synchronization objects, like mutexes. See the API function CreateSemaphoreW. TSemaphore inherits a property LastError from THandleObject, it may serve as well.
  13. If you're german you may want to post on the german DelphiPraxis site, link is at the top right of this page. Anyway: in the Tools -> Options dialog you can find the default folders the compiler will put package-related files in (*.bpl, *.dcp). But these can be overridden in the project options for each package project, so check there too. The project options should have "$(BDSCOMMONDIR)\BPL" as package output folder to use the IDE default. The run-time package has to be in a folder that is on the system PATH, since such packages are loaded by the OS following the same search logic used for DLLs (in fact packages are DLLs with some Delphi-specific extensions). The design-time package can be in a folder not on the PATH since the IDE loads design-time packages using the full path. The IDE installer adds the default folder for run-time packages to the PATH, but that may fail if your PATH is already very long, so better check it. As for installing: do you get no context menu if you right-click on the project name in the Project Manager view?
  14. PeterBelow

    How to set font size for Interbase iSQL

    iSQL is a console program. The system menu of the console should contain a menu item "Properties" (on my german Windows 10 it is called "Eigenschaften") and in the dialog that calls up you can set font size, color, name etc.
  15. PeterBelow

    Installing the NewAC component doesn't work

    Looks like the folder the created dcus are in is not on the IDE library path or the project's search path. Add that folder yourself.
  16. PeterBelow

    IDE stopped saving to *.~

    Which Delphi version are you using? If Delphi 10 or newer you should have _history and _recovery folders in the project's folder, look there. And for the future: make sure you have the autosave feature enabled in the IDE options dialog!
  17. PeterBelow

    IDE stopped saving to *.~

    Newer Delphi versions do not create these files anymore since that did only allow one single backup version to be maintained. The _history folder allows multiple versions of the backup, which is much more useful in my opinion.
  18. PeterBelow

    Disconnected Session

    Since the IDE is 32 bit and so is the integrated debugger debugging a win64 program does run via paserver, just locally. This did have problems in D10, which did get better in D11 and (supposedly, no personal experience yet) in D12. In your scenario it is not a network problem in my opinion, but the IDE is loosing the connection to paserver for some reason. If the error happens, do you see an instance of paserver in task manager? If not, do you see one before you run into the error?
  19. PeterBelow

    Disconnected Session

    What target platform is the program you try to debug for? This looks like a problem of debugging via paserver running on another machine over an unstable network connection...
  20. PeterBelow

    Syndey and Athens in same PC

    You can install major versions in parallel but there is one known problem with D11 and D12 if you use certain IDE add-ins (Parnassus bookmarks and one other) due to a naming conflict in some DLLs they use. See here.
  21. PeterBelow

    finding the share of a unc path

    See TPath, it has divers and sundry methods to dissect pathes, including UNC pathes.
  22. PeterBelow

    Delphi 12 IDE, auto-formatter mutilates generics

    Write properly formatted code in the first place? (gdr)
  23. PeterBelow

    Encryption (AES)

    Depends on what you consider "safe". Most stuff on GetIt comes with full source code, so you compile it yourself and for stuff like encryption you do not need any design-time packages, just the code units. I have used (ex) TurboPower Lockbox for encryption in the past; the most recent version can be found on Github.
  24. Packages are an all or nothing thing. In your case the TIdentRec type used by host and package are not the same type, despite of the same name. The package and the host app each contain their own copy of the TestApi unit. To make this work you have to place this unit into its own run-time package, which is then named in the package list of the application and the requires clause of the dynamically loaded package. This way both use the same "instance" of the unit. If you load packages dynamically it is also more reliable to not unload them explicitely but leave that to the RTL package management when the application closes. This avoids some arcane problems with premature unit finalizations. In your case unloading the package seems to mess up the memory manager.
  25. PeterBelow

    Are BPLs and/or DCPs Build specific?

    Yes, you have to make sure the dcus for debug and release are deposited in different folders and modify the debug dcus path in your project accordingly. I have no experience in building projects using run-time packages, but I suspect that you will have to build release and debug packages with different names to avoid conflicts. In fact I would recommend debugging without building with packages, if feasable. Makes life much easier...
×