- 积分
- 181
- 明经币
- 个
- 注册时间
- 2003-3-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2003-5-20 00:50:00
|
显示全部楼层
隐藏窗体是肯定的,但是没有达到lisp命令完成后才返回vba,程序修改入内
可能你们没有装r14,所有下面的代码才能在r14下运行,有2处修改
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_COPYDATA = &H4A
Type COPYDATASTRUCTURE
dwData As Long
cbData As Long
lpData As String
End Type
Public Sub SendCommand(CommandString As String)
Dim udtData As COPYDATASTRUCTURE
Dim lngHwnd As Long
udtData.dwData = 1
udtData.lpData = CommandString
udtData.cbData = LenB(CommandString) + 2
lngHwnd = FindWindow(vbNullString, ThisDrawing.Application.Caption)
SendMessage lngHwnd, WM_COPYDATA, 0, udtData
End Sub |
|