How to create Chrome like application in Delphi which runs multiple processes inside one Window?

后端 未结 6 725
Happy的楠姐
Happy的楠姐 2021-01-30 14:52

Is it possible to create an \"application group\" which would run under one window, but in separate processes, like in Chrome browser? I\'d like to divide one application into m

相关标签:
6条回答
  • 2021-01-30 15:28

    I am not sure about how Delphi operates but the standard procedure for multiprocess programming is forking.

    You fork a new process with whatever code you want. Pass information to the forked process and let it run doing whatever it wants.

    Can't explain multiprocess programming in one thread response. But look it up.

    0 讨论(0)
  • 2021-01-30 15:34

    You can separate your application logic and execute it in several threads. That way, if one part of your application logic hangs up, you still have a responsive application. But you won't be able to put the GUI in multiple threads. The VCL requires you to execute all GUI related stuff in the main thread.

    0 讨论(0)
  • 2021-01-30 15:38

    I guess basically you would create multiple processes each of which creates a window/form. One of the processes has the master window in which every child window is embedded. That is as simple as calling SetParent. The windows in different processes would talk to each other using an IPC (Inter Process Communication) mechanism like named pipes or window messages.

    See this question for an embedding example of using SetParent in Delphi. See this question for an example of using named pipes in Delphi.

    0 讨论(0)
  • 2021-01-30 15:46

    Have a look at : http://blogs.microsoft.co.il/blogs/maxim/archive/2008/09/23/curiosity-killed-the-programmer-multiprocess-browser.aspx . The source of the app is in CSharp. I'm sure you can adapt it to Delphi.

    0 讨论(0)
  • 2021-01-30 15:48

    Have a look at the Delphi code of HeidiSQL. It's a great open source MySQL client that implements this mechanism.

    Read this newsitem that was posted when Chrome was released:

    "Google playing catch-up with HeidiSQL?"

    :-)


    (source: heidisql.com)

    0 讨论(0)
  • 2021-01-30 15:50

    Harriv, you can use a scheme based on plugins. where you have a main application and this dynamically load news functionality. There are several libraries available here I leave some.

    alt text

    Frameworks

    • TMS Plugin Framework
    • TJvPluginManager from JVCL
    • Delphi Plugin Framework
    • Hydra

    Tutorials

    • Implementing Plug-Ins for Your Delphi Applications
    • How to make a Plugin for Your Application (Source Code)

    Bye.

    0 讨论(0)
提交回复
热议问题