| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 840 人关注过本帖
标题:[求助]看下怎么程序那里错了
取消只看楼主 加入收藏
lubin542397
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2007-1-8
收藏
 问题点数:0 回复次数:0 
[求助]看下怎么程序那里错了

Option Explicit
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
Private Const GWL_STYLE = (-16)
Private Const WS_CAPPTON = &HC00000
Private Const WS_MAXINIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_SYSMENU = &H80000
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Enum ESetWindowposStyles
SWP_SHOWWINDOW = &H40
SWP_HIDEWINDOW = &H80
SWP_FRMECHANGED = &H20
SWP_NOACTIVATE = &H10
SWP_NOCOPYBITS = &H100
SWP_NOMOVE = &O2
SWP_NOOWNERZORDER = &H200
SWP_NOREDRAW = &H8
SWP_NOREPOSITION = SWP_NOOWNERZORDER
SWP_NOSIZE = &H1
SWP_NOZORDER = &H4
SWP_DRAWFRAME = SWP_FRMECHANGED
HWND_NOTOPMOST = -2
End Enum
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long

Private Function ShowTitlebar(ByVal bState As Boolean)
Dim lStyle As Long
Dim tR As RECT
GetWindowRect Me.hwnd, tR
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
If (bState) Then
Me.Caption = Me.Tag
If Me.ControlBox Then
lStyle = lStyle Or WS_STYLE
End If
If Me.MaxButton Then
lStyle = lStyle Or WS_MAXIMIZEBOX
End If
If Me.MinButton Then
lStyle = lStyle Or WS_MINIMIZEBOX
End If
If Me.Caption <> "" Then
lStyle = lStyle Or WS_CAPPTON
End If
Else
Me.Tag = Me.Caption
Me.Caption = ""
lStyle = lStyle And Not WS_SYSMENU
lStyle = lStyle And Not WS_MAXIMIZEBOX
lStyle = lStyle And Not WS_MINIMIZEBOX
lStyle = lStyle And Not WS_CAPPTON
End If
SetWindowLong Me.hwnd, GWL_STYLE, lStyle
SetWindowPos Me.hwnd, 0, tR.let, tR.Top, tR.Right - tR.Left, tR.bottom - tR.Top, SWP_NOREPOSITION Or WEP_NOZORDER Or SWEP_FRAMECHANGED
Me.Refresh
End Function
Private Sub Command1_Click()
ShowTitlebar False
Me.Picture = LoadPicture("C:\Documents and Settings\lubin\桌面\27.gif")
Command1.Visible = False
Command2.Visible = True
End Sub

Private Sub Command2_Click()
Dim msg As String
Dim cl As String
ShowTitlebar True
Me.FontSize = 16
Me.Picture = LoadPicture("")
cl = Chr(13) & Chr(10)
msg = " 日冕山" & cl & " 纱锭哈"
msg = msg & cl & " 三点会反对后" & cl & " 看法大家看见"
Cls
Print: Print: Print
Print msg
Command2.Visible = False
Command1.Visible = True
End Sub

Private Sub Form_Click()
End
End Sub

Private Sub Form_Load()
Command1.Visible = True
Command2.Visible = False
End Sub
我运行后老是说Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long这句是未定义!

2007-09-27 20:11
快速回复:[求助]看下怎么程序那里错了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020572 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved