有一個程序,
title 名含有 text1.text 中的字
如何搜索含有text1.text 的程序,並focus
title 名含有 text1.text 中的字
如何搜索含有text1.text 的程序,並focus
解决方案 »
- 在龙空上面的技术帖被人围攻加车轮大战了, 1vsN那种, 愿爱因斯坦赐予我力量吧, 我是老蔡!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 请教如何实现listview列表的子项选中(check)?
- [源码]让你的窗体象QQ那样,可以在在屏幕上方自动伸缩(感谢枕善居)
- FSO对象在98中.
- 在VB中如何获取一个ActiveX Dll的版本号及所包含的所有类名?
- 如何捕获键盘被敲击?
- 如何获取置顶的窗体并在其底部添加跑马灯文字?
- 有关目录删除的问题,谁能解决这个问题我给300分(还可以加),建议、up也有分
- vb实现excel 问题:如何把一行数据copy到指定行
- Excel Object Library 不支持后绑定吗?
- 这里为什么要定义成数组?
- 请问那个API常量代表msflexgrid 的滚动条长度
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As LongPrivate Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End TypePrivate Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As LongPrivate Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZEPrivate Sub Command1_Click()
Dim hwnd As Long, ret As Long
Dim mrect As RECThwnd = FindWindow(vbNullString, Text1.Text)If hwnd Then
GetWindowRect hwnd, mrect
SetWindowPos hwnd, HWND_NOTOPMOST, mrect.Left, mrect.Top, mrect.Right - mrect.Left, mrect.Bottom - mrect.Top, TOPMOST_FLAGS
End IfEnd Sub