setmyparent.bas

来自「星级酒店管理系统(附带系统自写控件源码)」· BAS 代码 · 共 15 行

BAS
15
字号
Attribute VB_Name = "SetMyParent"

Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Public Sub SetItParent(nChild As Long, nNewParent As Long)

  Dim nRet As Long
      nRet = SetParent(nChild, nNewParent)
  If nRet = 0 Then
     MsgBox "设置父窗体错误!  ", vbInformation
     Exit Sub
  End If
  
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?