|
本帖最后由 liuguansky 于 2011-11-8 12:27 编辑
- Private Declare Function OpenClipboard Lib "User32" (ByVal hWnd As Long) As Long
- Private Declare Function CloseClipboard Lib "User32" () As Long
- Private Declare Function GetClipboardData Lib "User32" (ByVal uFormat As Long) As Long
- Private Declare Function CopyEnhMetaFileA Lib "Gdi32" (ByVal hemfSrc As Long, ByVal lpszFile As String) As Long
- Private Declare Function DeleteEnhMetaFile Lib "Gdi32" (ByVal hdc As Long) As Long
- Private Sub TextBox1_Change()
- Dim rng As Range, Fp$
- If Len(TextBox1.Text) Then
- Set rng = Range("A:a").Find(TextBox1.Text, , , xlWhole)
- If Not rng Is Nothing Then
- Application.ScreenUpdating = False
- Fp = "C:\Liuguansky.Bmp"
- rng.Comment.Visible = True
- rng.Comment.Shape.CopyPicture xlScreen, xlPicture
- rng.Comment.Visible = False
- OpenClipboard 0
- DeleteEnhMetaFile CopyEnhMetaFileA(GetClipboardData(14), Fp)
- CloseClipboard
- Application.CutCopyMode = False
- Image1.Picture = LoadPicture(Fp)
- Image1.PictureSizeMode = fmPictureSizeModeZoom
- Application.ScreenUpdating = True
- Else: Image1.Picture = LoadPicture()
- End If
- End If
- End Sub
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?免费注册
x
评分
-
2
查看全部评分
-
|