Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 40671|回复: 225

[分享] 无标题栏窗体

  [复制链接]
发表于 2008-6-12 11:34 | 显示全部楼层 |阅读模式
本帖最后由 爱疯 于 2011-10-14 20:57 编辑

Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const GWL_STYLE As Long = (-16)
Private Const WS_CAPTION As Long = &HC00000


Private Sub UserForm_Initialize()
    hwnd = FindWindow("ThunderDFrame", Me.Caption)
    SetWindowLong hwnd, GWL_STYLE, IStyle
    DrawMenuBar hwnd
End Sub


 

API相对来说代码很少了(只有几行),不必理解,拿来就用[em01]

[hide] BoxBMBn8.rar (9.28 KB, 下载次数: 250)

 楼主| 发表于 2008-6-12 11:35 | 显示全部楼层
回复

使用道具 举报

发表于 2008-6-12 11:46 | 显示全部楼层
回复

使用道具 举报

发表于 2008-6-12 11:53 | 显示全部楼层

QUOTE:
以下是引用不看不看在2008-6-12 11:35:00的发言:
学八版,试下回复帖[em07]

回复

使用道具 举报

发表于 2008-6-12 12:19 | 显示全部楼层

不看不看!

只瞧瞧!

回复

使用道具 举报

发表于 2008-6-12 12:30 | 显示全部楼层

[em05]
回复

使用道具 举报

发表于 2008-6-12 12:31 | 显示全部楼层

看看
回复

使用道具 举报

发表于 2008-6-12 12:32 | 显示全部楼层

回复

使用道具 举报

发表于 2008-6-12 12:35 | 显示全部楼层

看看
回复

使用道具 举报

发表于 2008-6-12 12:53 | 显示全部楼层

学习
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-6-4 06:22 , Processed in 0.270805 second(s), 8 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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