将Tframe从bpl加载到应用程序 [英] Load Tframe from bpl to application

查看:107
本文介绍了将Tframe从bpl加载到应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在delphi包(bpl)中加载一个tframe,以显示在主应用程序中 请给我包装和应用程序的代码.

I am trying to load a tframe inside a delphi package (bpl) to be shown in my main app please give me code for both package and application.

推荐答案

给一个男人一条鱼,他吃了一天,学习一个男人的鱼,他吃了一辈子.所以没有适合您的代码:)

Give a man a fish and he eats for a day, learn a man to fish and he eats his whole life. So no code for you :)

您应该如何做:

  1. 启动Delphi,创建一个新程序包.
  2. 将TFrame添加到您的bpl
  3. 保存并编译,您现在应该具有.bpl和.dcp.
  4. 关闭所有
  5. 创建一个新的应用程序
  6. 在项目属性中,打开使用运行时程序包构建"
  7. 将bpl添加到运行时程序包列表中.
  8. 在搜索路径中包括bpl和dcp文件的目录
  9. 关闭项目属性
  10. 转到您的Form1,将带有TFrame的单元添加到您的用途中.
  11. 在FormCreate事件中,创建TFrame并将其添加到您的应用程序中
  12. 编译并运行
  1. Start Delp Create a new package.
  2. Add a TFrame to your bpl
  3. Save and compile, you should now have a .bpl and a .dcp.
  4. Close all
  5. Create a new application
  6. In your project properties, turn on "Build with Runtime packages"
  7. Add your bpl to the runtime packages list.
  8. Include the directories of your bpl and dcp files in the search path
  9. Close your project properties
  10. Go to your Form1, add the unit with your TFrame to your uses.
  11. In the FormCreate event, create the TFrame and add it to your application
  12. Compile and run

摘要:使用框架创建一个包装(bpl).在您的应用程序中,将bpl添加到您的运行时软件包列表中,然后像平常一样使用TFrame.

Summary: Create a package (bpl) with your frames. In your application, add the bpl to your runtime packages list and then use the TFrames as you would normally do.

这篇关于将Tframe从bpl加载到应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆