请问什么控件可以将程序的界面(Form)分成几部分,并可以随意拖动??该控件在那里啊??

warnerchen 2003-10-16 03:30:42
请问什么控件可以将程序的界面(Form)分成几部分,并可以随意拖动??该控件在那里啊??
...全文
69 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xayzmb 2003-10-17
  • 打赏
  • 举报
回复
Option Explicit

'***************************************************
'建一个窗体
'加入两个文本框(text1,text2)和一个图片框(picture1)
'*******************************************

Private Sub Form_Load()
Picture1.MousePointer = 9
Picture1.Appearance = 0
Picture1.BackColor = &H8000000F
Picture1.BorderStyle = 0
Picture1.Width = 150
End Sub

Private Sub Form_Resize()
On Error GoTo err1
Text1.Top = 0
Text1.Left = 0
Text1.Width = 3000
Text1.Height = form1.Height
Picture1.Top = 0
Picture1.Left = Text1.Width - 50
Picture1.Height = form1.Height

Text2.Top = 0
Text2.Left = Text1.Width + Picture1.Width - 50
Text2.Height = form1.Height
Text2.Width = form1.Width - Text1.Width - Picture1.Width
Exit Sub

err1:
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error GoTo err1
If Button = 1 Then
Picture1.Move Picture1.Left + X
Picture1.ZOrder (0)
End If
Exit Sub

err1:
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error GoTo err1
If Button = 1 Then
Text1.Left = 0
If Picture1.Left < 1000 Then
Text1.Width = 1000
Picture1.Left = 1000
Else
If Picture1.Left > form1.Width Then
Text1.Width = form1.Width - 500
Picture1.Left = Text1.Width
Else
Text1.Width = Picture1.Left
End If
End If

Text2.Left = Text1.Width + Picture1.Width
Text2.Width = form1.Width - Text1.Width - Picture1.Width
End If
Exit Sub

err1:
End Sub



hlm750908 2003-10-17
  • 打赏
  • 举报
回复
用应用程序向导做一个资源管理器类型的程序

再打开看看
j4sxw 2003-10-16
  • 打赏
  • 举报
回复
UP

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧