vb 中check控件如何在text控件 中显示
展开全部
控件:Text1,Check1.代码如下。
===========
Option Explicit
Private Const SWP_NOSIZE = &H1
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
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 Sub Form_Load()
SetParent Check1.hwnd, Text1.hwnd
SetWindowPos Check1.hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE
End Sub
===========
Option Explicit
Private Const SWP_NOSIZE = &H1
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
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 Sub Form_Load()
SetParent Check1.hwnd, Text1.hwnd
SetWindowPos Check1.hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询