设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[报表] [分享]呵呵,用了这个,俺不知怎样关闭报表了

[复制链接]
跳转到指定楼层
1#
发表于 2005-11-5 02:30:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
2002

Private Declare Function SetWindowLong Lib "user32" Alias _

        "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _

        ByVal dwNewLong As Long) As Long

   Private Declare Function GetWindowLong Lib "user32" Alias _

        "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) _

        As Long



   'Establish constants for elements of the Window.

   Const WS_MINIMIZEBOX = &H20000 'creates a window with a maximize box

   Const WS_MAXIMIZEBOX = &H10000 'creates a window with a minimize box

   Const WS_SYSMENU = &H80000 'creates window with a System-Menubox in its titlebar.



   Const GWL_STYLE = (-16)



Private Sub Report_Activate()



   Dim L As Long



   'Get the current style.

   L = GetWindowLong(Me.hwnd, GWL_STYLE)



   'Modify the current style, subtracting

   'the System menu. This removes the Close button also.

   L = L And Not (WS_SYSMENU)



   'Also modify the current style, subtracting the

   'Minimize & Maximize buttons, by uncommenting the following

   'line and commenting the line above.

   'If you subtract the Minimize button, the Maximize button is

   'also subtacted and vice versa.

   ''L = L And Not (WS_MINIMIZEBOX)

   ''L = L And Not (WS_MAXIMIZEBOX)



   L = SetWindowLong(Me.hwnd, GWL_STYLE, L)



End Sub

http://support.microsoft.com/default.aspx?scid=kb;en-us;304312

http://support.microsoft.com/default.aspx?scid=kb;en-us;304313
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-18 18:47 , Processed in 0.075808 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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