设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 631|回复: 0
打印 上一主题 下一主题

[窗体] 调用画图后让其最大化显示在前端的请教

[复制链接]
跳转到指定楼层
1#
发表于 2024-1-12 16:20:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用Access调用画图打开一个图片让其最大化显示在前端不了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 Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long     

'Sub test()
Dim hwnd As Long, thwnd As Long
Shell ("C:\Windows\system32\mspaint.exe  D:\091611\桌面\报销清单+发票\报销清单+发票\1.jpg")
hwnd = FindWindow("MSPaintApp", "1.jpg - 画图") '得到句柄
ShowWindow hwnd, sw_show'
SendKeys "{ENTER}", True
SetForegroundWindow (hwnd)
End Sub



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-12-1 17:21 , Processed in 0.102632 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表