请问高手:如何获得Flash动画控件ShockwaveFlash1的句柄hWnd,以便在Flash动画上响应鼠标事件。
解决方案 »
- 目前最牛的課程表
- VB如何正确显示金山词霸2009生词本输出文件中的音标?
- 无边框窗体最大化时如何使其不挡住任务栏?
- 请教如何使用vb与Socks5或者Http代理代理服务器通讯(在线等)
- 这个SQL语句如何写?请帮帮忙,谢谢!
- 请问,怎么把一段HTML代码写给一个控件让他显示为HTML内容?
- 怎样利用 vb 做一个能去到浏览网页的同时,取得网页的原代码呢 ?
- 在资源管理中选择一个文件夹,如果在好VB中知道选择了哪个文件夹?难题!!!
- (无聊)看到一个笑话,与大家共享(不给分)
- 要是我们大家成立一个软件设计联盟就好了!
- 问一个比较简单的问题:请问怎么样判别用户输入的路径是否合法?比如:"D:\NewDir\safa?<*" 和 "sdf\NewDir"就是两个非法的路径串.请问怎么
- 怎么样把查询得到的结果输出到excel文件?
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPrivate Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As LongPrivate Sub Command1_Click()
If WriteOnFlashWindow("你好!我是绿豆!") Then
MsgBox "成功了~~"
Else
MsgBox "失败了~~"
End If
End SubFunction FindFlashWindow(ByVal hWndParent As Long) As Long
FindFlashWindow = FindWindowEx(hWndParent, 0&, "MacromediaFlashPlayerActiveX", "")
End FunctionFunction WriteOnFlashWindow(ByVal sWord As String) As Boolean
On Error Resume Next
Dim hWndFlash As Long
Dim hDCFlash As Long
sWord = "Hello World!"
hWndFlash = FindFlashWindow(Form1.hwnd)
If hWndFlash Then
hDCFlash = GetDC(hWndFlash)
If hDCFlash Then
TextOut hDCFlash, 0, 0, sWord, Len(sWord)
ReleaseDC hWndFlash, hDCFlash
End If
End If
WriteOnFlashWindow = (Err.Number = 0)
End Function