VBGood网站全文搜索 Google

首页 - 经验之谈 - 建立无模式窗口
发表评论(0)作者:不详, 平台:VB6.0+Win98, 阅读:11706, 日期:2001-07-11
注释:make a new project; two forms
注释:on form1 a command button
注释:put the code in the right places
注释:press F5

Sub Form2_load()
注释:in the form2_load event
注释:be sure to make the form2 smaller then form1!
lngOrigParenthWnd = SetWindowWord(Me.hwnd, -8, mdiMain.hwnd)

End Sub

Private Sub Form_Unload(Cancel As Integer)
注释:in the form2_unload event
Dim lngResult&

lngResult = SetWindowWord(Me.hwnd, -8, lngOrigParenthWnd)

End Sub

注释:in the form2_general section
Private Declare Function SetWindowWord Lib "user32" (ByVal hwnd&, ByVal nIndex&, ByVal wNewWord&) As Long
Private lngOrigParenthWnd&

Sub Command1_click

End Sub