外部程序如何嵌套到窗体上
来源:互联网 发布:网络贷款好口子 编辑:程序博客网 时间:2024/04/27 15:03
- ' API声明
- Private Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
- Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Integer) As Integer
- ' 调用
- Dim ptrHandle As IntPtr ' 外部程序的句柄
- Dim intLeft As Integer, intTop As Integer ' 外部程序在窗体内的位置
- Dim intWidth As Integer, intHeight As Integer ' 外部程序在窗体内的大小
- ' 获取外部程序的句柄
- ptrHandle = FindWindow(vbNullString, "Adobe photoshop") ' 引号中是外部程序的标题名
- ' 嵌入当前窗体
- SetParent(ptrHandle, Me.Handle)
- ' 设置外部程序在窗体内的位置和大小(省略)
- ' 移动到指定的位置
- MoveWindow(ptrHandle.ToInt32, intLeft, intTop, intWidth, intHeight, 1)
- 外部程序如何嵌套到窗体上
- Delphi调用一个外部程序时,如何把外部程序的窗体放在主程序窗体的Panel上?
- 如何在MDI程序中把子窗体菜单合并到主窗体上
- 如何在MDI程序中把子窗体菜单合并到主窗体上
- 如何在MDI程序中把子窗体菜单合并到主窗体上
- 如何在MDI程序中把子窗体菜单合并到主窗体上
- VB控制子窗体(外部程序)在Picture控件上
- 如何控制其他程序窗体上的窗口控件(上)
- 实现从外部拖放图片到窗体上的picturebox中
- springboot 如何发布到外部的web服务器上
- 如何控制其他程序窗体上的窗口控件:下
- 如何控制其他程序窗体上的窗口控件(中)
- 如何控制其他程序窗体上的窗口控件(下)
- 如何控制其他程序窗体上的窗口控件
- 如何控制其他程序窗体上的窗口控件:中
- 如何控制其他程序窗体上的窗口控件
- 如何发布程序到手机上?
- WinForm程序如何将子窗体嵌入到父窗体的Panel里
- java生产者 消费者问题
- Firefox---快捷键
- 网络营销与策划实践考试试题(二)
- OpenLayers 项目分析——BaseTypes
- Ext JS 学习(11) Ext.Template的使用
- 外部程序如何嵌套到窗体上
- robots.txt 规则
- News Digest
- 调整ViewState的位置,搜索引擎优化
- 国产的操作系统
- 【OReilly : Java Swing 】Chapter3
- 新手上路_vc多线程例子,关于AfxBeginThread的用法
- x264源代码分析
- hibernate事务与session管理小结