uses shellapi;

...

procedure TForm1.Button2Click(Sender: TObject);
var vh: HWND;
begin
ShellExecute(Self.Handle,'open',Pchar(filename),'',nil,SW_SHOWNORMAL);
vh := Windows.FindWindow(nil, '窗口标题串');
if vh<>0 then
begin
Windows.SetParent(vh, Self.Panel1.Handle);
Windows.MoveWindow(vh, 0, 0,Self.Panel1.Width,Self.Panel1.Height,True);
end
else
ShowMessage('xx程序未运行!');
end;

Delphi调用一个外部程序时,如何把外部程序的窗体放在主程序窗体的Panel上?的更多相关文章

  1. 在使用HttpClient做客户端调用一个API时 模拟并发调用时发生“死锁"?

    平时还是比较喜欢看书的..但有时候遇到问题还是经常感到脑袋一蒙..智商果然是硬伤.. 同事发现了个问题,代码如下: class Program { static void Main(string[] ...

  2. Delphi 调用外部程序并等待其运行结束

    转自:http://blog.csdn.net/xieyunc/article/details/4140620   如何让Delphi调用外部程序并等待其运行结束 1. uses     Window ...

  3. delphi调用外部程序打开文件

    delphi调用外部程序打开文件 ShellExecute的各种用法 一.利用系统默认的邮件收发器发送电子邮件 Uses ..., ShellAPI; Var lpHwnd: HWND; lpOper ...

  4. Delphi - 调用外部程序并阻塞到外部程序中

    Delphi 调用外部程序并阻塞到外部程序中 背景说明: 前段时间开发一个数据转换的系统,业务逻辑中说明数据需要压缩成.tar.gz格式. 我在Windows系统下采用,先生成批处理文件,然后调用Wi ...

  5. 【转】Delphi调用webservice总结

    原文:http://www.cnblogs.com/zhangzhifeng/archive/2013/08/15/3259084.html Delphi调用C#写的webservice 用delph ...

  6. [转]Delphi调用cmd的两种方法

    delphi调用cmd的两种方法vars:string;begins:='cmd.exe /c '+edit1.Text+' >c:\1.txt';winexec(pchar(s),sw_hid ...

  7. Delphi调用webservice总结

    Delphi调用webservice总结     Delphi调用C#写的webservice 用delphi的THTTPRIO控件调用了c#写的webservice. 下面是我调试时遇到的一些问题: ...

  8. 又踩.NET Core的坑:在同步方法中调用异步方法Wait时发生死锁(deadlock)

    之前在将 Memcached 客户端 EnyimMemcached 迁移 .NET Core 时被这个“坑”坑的刻骨铭心(详见以下链接),当时以为只是在构造函数中调用异步方法(注:这里的异步方法都是指 ...

  9. 实现在GET请求下调用WCF服务时传递对象(复合类型)参数

    WCF实现RESETFUL架构很容易,说白了,就是使WCF能够响应HTTP请求并返回所需的资源,如果有人不知道如何实现WCF支持HTTP请求的,可参见我之前的文章<实现jquery.ajax及原 ...

随机推荐

  1. 文件和目录之stat、fstat和lstat函数

    #include <sys/stat.h> int stat( const char *restrict pathname, struct stat *restrict buf ); in ...

  2. php测试代码工具类

      <?php error_reporting (E_ALL); ini_set ('display_errors', 'on'); ?> <meta http-equiv=&quo ...

  3. eclipse安装android sdk后工具栏没有图标的设置

    如果没有出现这android图标,选择'Window>Customize Perspective...>Commands',并在'Available command groups'中勾选' ...

  4. Java + MongoDB Hello World Example--转载

    原文地址:http://www.mkyong.com/mongodb/java-mongodb-hello-world-example/ A simple Java + MongoDB hello w ...

  5. STC89C52单片机内部EEPROM驱动

    STC89C52单片机自身带有4K的存储空间,分为8个扇区,每个扇区512字节,第一扇区起始地址为:0x2000, 结束地址为:21FF, 第八扇区起始地址为0x2E00,结束地址是2FFF #inc ...

  6. java 获取本机ip地址

    /** * 取当前系统站点本地地址 linux下 和 window下可用 * * @return */ public static String getLocalIP() { String sIP = ...

  7. Java 8 Date Time API Example Tutorial – LocalDate, Instant, LocalDateTime, Parse and Format

    参考 Java 8 Date and Time API is one of the most sought after change for developers. Java has been mis ...

  8. Forwarding a Range of Ports in VirtualBox

    STAN SCHWERTLY MAY 9, 2012 ARTICLES 3 COMMENTS Doesn't allow forwarding a range of ports through the ...

  9. C语言---注释

    1.单行注释 //注释内容 2.多行注释 /*注释内容*/ 3.#if 0 注释内容 #endif 说明: 1.单行注释//不通用,有些编译器不支持 2.多行注释不能嵌套 3.#if 0 #endif ...

  10. Linux下解决permission denied问题

    由于权限问题,在linux下启动tomcat出现权限permission denied 提示解决方法如下: 1.cd 进入tomcat/bin目录 2.运行下面命令 sudo chmod 777 st ...