Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/06/20 in all areas

  1. aehimself

    3 explorer running

    And that is an issue, if you ask me. To be honest I lost track a long time ago, but for a while the Windows Taskbar and the Desktop was hosted by an instance of the same explorer.exe process what you launched when you clicked on "My computer"; maybe Windows is using it for even more undocumented things (like specific background processes; which would answer why they just come and go). If your application requires to interact with an Explorer window, you should let your users to choose which one. But then again - this is how I think. Wrong. A process has multiple granted properties; like an executable NAME and a PID for example. All processes have that, having visible windows or not, being service applications or not, being launched under a svchost process or not. Depending on how you enumerate those, you get different properties available. I personally never used ShellWindows as I always went for EnumWindows or FindWindow what @Fr0sT.Brutal advised to you already. It's a bit more low level, but opens up tons of opportunities. And this part; I must totally have to agree with @David Heffernan. If someone anonymous on the Internet would tell you "Download my app, it's useful, you always can delete"... would you trust him/her? At this point noone really understands why you are doing what you are doing so they are unable to give you alternatives. Without an understandable code snipplet (e.g. I have no damn clue what "Do not forget Dispatch := ShellWindows.Item(i); is nil" means and I think I'm not alone) or a clear goal set... it just sounds like an other million dollar idea what SW developers are usually getting.
  2. Tntman

    Drone control from mobile

    I made a lot of apps but I think that this one is most interesting for showing.. I started making my own drone from scratch so in the middle of the process i decided to make app that will control my drone. Here is the actual schema how it works: This project was pretty interesting because i incorporated windows application, mobile application and also an arduino scripts and arduino programming. here is picture of game, basically im moving drone and collecting coins and trying to not hit anything and die.. You can also control drone over pc controls, on the right there is logger that keep track off all commands exchanged Here is picture of mobile control
  3. Anders Melander

    Which Objects Allow ActiveControl?

    Welcome to software development. You may find that things become easier (or even clear) for you if you: Read the help. Learn about classes and inheritance. Specifically the VCL class hierarchy is important. Examine the VCL source code. See what others do. See what works and what doesn't and learn from your experience.. Good luck.
  4. Now this applies only to Windows as I'm not working with Linux machines, but the Windows Computer Browser service is basically collecting a bunch of broadcasted information and then others connect to it via TCP (source). If the activity-based startup is locked to an IP it will not be triggered by broadcast messages; the rest of the communication will be between other PCs and the current directory master. Alas, this only applies for standard services. My program attempting to ping this IP to see if it's alive or not will trigger the power on for sure.
  5. Laurens

    Please vote - SonarCube support

    I have just published an updated version our SonarQube Delphi plugin which supports Sonar 7.9 LTS and also the latest 8.2 version, see https://github.com/mendrix/SonarDelphi. If you combine this with the DelphiCodeCoverage tool (see https://sourceforge.net/projects/delphicodecoverage/) and DUnitX (including the additional file in our SonarQube repository) you have a fully functioning static analyser AND codecoverage for Delphi. I think this is the best combination so you don't have to use several tools together (like FixInsight).
  6. Rollo62

    Global StyleBook component

    I use custom styles only at the very minimum possible, but some controls unfortunately doesn't allow any other chance for tinting and re-coloring backgrounds etc. Thats a pity, because if that would be possible I wouldn't need any custom styles at all. I know , the styles were made exactly for that purpose, but its way too much efford to make a custom design, when simple fill/stroke/text colors will do the job.
  7. aehimself

    Minifing HTML

    I quickly realized. It threw a nullpointer exception anyway because of embedded JavaScript. And XML does not have that 🙂 Our overgrown legacy system is talking to an other, overgrown legacy system through a custom protocol, transporting the XMLs in a beautified form. Now the issue is, that sometimes these two systems start to get misaligned because either of a 3rd overgrown legacy system, a bug in their software or a bug in ours. So after fixing a bug these information packets should be re-processed or re-sent. And as the protocol was designed you always need a reference to an earlier packet as well... quite complicated, resulting us having to save all communication between our software instances and their system. Originally, someone decided to keep the XMLs in a BLOB field in a table. Unfortunately the code is so big and disorganized (20+ years old) that changing the saving scheme would need a re-writing half our application plus the web interface. We know it should be done but we also know that it never will be done as the clients do not pay for refactoring. The good thing in legacy systems are the gems what you can find. My favorite goes like this: Function GetUserID: Integer; Begin Case MenuID Of 0: Result := -1; 1: Result := -1; 2: Result := -1; [...] 100: Result := -1; Else Result := -1; End; End; ... and oooooh, those sweet comments 🙂 Too bad that most of them are in Hungarian, otherwise I'd have posted them on DevHumor.
  8. David Heffernan

    3 explorer running

    I'm afraid that none of this makes a lot of sense. Why do you feel that there should only be one explorer process? Why does that matter?
  9. Remy Lebeau

    Common code base for VCL and FMX control code

    Is your component visual (derived from TControl)? Or is it non-visual (derived from TComponent)? Non-visual components can be used in both VCL and FMX without splitting up the implementation (just IFDEF the pieces you need). But visual controls take more work to design for separate frameworks. Then those lines should be in separate units. The rest of your code should be in a common unit(s) that the framework-specific units can then use. This is where Unit Scope Names come into play. Create separate VCL-specific and FMX-specific projects with appropriate Unit Scope Names specified in the Project Options, and then don't use any Unit Scope names in your code. That way, you have less IFDEF'ing to do. Your common gtDocumentPrinter code should be in its own separate unit, not in an include file. All the more reason not to use an include file.
  10. vfbb

    Common code base for VCL and FMX control code

    I suggest you to create 2 different packages, with the same units, but need to have 2 different packages, one for FMX and one for VCL. After create packages, add in the project options of each package, in the "Conditional defines" something like USING_VCL for the vcl package and USING_FMX for the fmx package.In code of your .pas just use: {$IFDEF USING_VCL} ... {$ENDIF} or {$IFDEF USING_FMX} ... {$ENDIF}
  11. I started working on support for installing packages per project, instead ide. http://memnarch.bplaced.net/blog/2020/03/delphinus-working-on-per-projectfolder-installation/
  12. I can't tell whether you're trying to solve a programming problem, or if you're just doing mental calisthenics trying to use different programming constructs in strange ways. I realize some people love using records and pointers to them in Pascal. But I spent 10+ years using c and c++ before getting into Delphi and I have always gotten confused about which side of the variable the ^ goes on and why you need to use it with a '.' because in c/c++ the '->' always goes on the right, and you never use any two of '.', '&', '*', and '->' next to each other. Maybe it's the same way some people have trouble grasping the difference between how ++i and i++ work in a for loop. Suffice it to say I bet you've used pointers in Delphi more in the past month than I've used them in the past 10 years. That class DOES show some effective uses of inheritance tho.
  13. you could just work 7/24, problem solved
  14. Vandrovnik

    Generics and Classes on Windows 2000 = OOM

    New versions of compiler may use new functions in Windows API, that are not present in Windows 2000. So application will start and then complain about missing something (or start and immediatelly die silently).
  15. Stefan Glienke

    Generics and Classes on Windows 2000 = OOM

    Dynamic arrays cannot leak unless you circumvent the compiler generated code controlling their reference counting.
  16. Bill Meyer

    Generics and Classes on Windows 2000 = OOM

    You appear to assume that this environment will continue to be viable as new versions of Delphi roll out. Unfortunately, the prevailing assumption in the development world is that a) memory is cheap, and b) it is measured in GB. Even without generics, the difference in an application built in Delphi XE and Delphi 10.2 is huge. In the case of a small app of my own, XE produced a 3MB executable, while 10.2 was over 70MB. These numbers are not horrible, but in the context of Windows 2000 treated as an embedded system, I think you are nearing the end of the line for those old systems. You may buy some time by avoiding generics, but sooner or later, you will hit a wall. In a system where your available resources are soldered into the product, you may well need to support a version for those systems which builds in an earlier version of Delphi, and perhaps cannot acquire the same new features as your main application.
  17. Sherlock

    Generics and Classes on Windows 2000 = OOM

    Wait. What? Megabytes? Really? I do recall W2k being quite thrifty with memory but that does not sound very likely.
  18. David Heffernan

    Generics and Classes on Windows 2000 = OOM

    Strange suggestions given that all symptoms point to memory leak in your code.
  19. Anders Melander

    Generics and Classes on Windows 2000 = OOM

    FWIW, Windows 2000 isn't supported by the version of Delphi you're using. Also, please read the event log message again. It has all the clues: It isn't your application that is experiencing an "out of memory" error. It's Windows that is experiencing an "out of virtual memory" error. To fix it: Increase the size of the page file. My guess is that the W2K system has a fixed size page file - or no page file at all. Otherwise it would just increase the size automatically - or maybe that feature was added later. I forget. and who cares anymore. If you're really interested in why you get a windows error and not an application error, read some books on Windows internals and the virtual memory manager, or just google it.
  20. David Heffernan

    Generics and Classes on Windows 2000 = OOM

    It's very plausible that you have a memory leak. Just because fastmm4 says you don't doesn't mean you don't. It's one thing returning memory when the program closes, another returning it in a timely fashion during execution.
  21. luebbe

    Please vote - SonarCube support

    If you use FixInsight on a build server (e.g. Jenkins) and import the FixInsight log files into the Jenkins warnings-ng plugin, you get a SonarQube like experience, plus the quick tests in the IDE. I'm happy with this combination.
×