vb6缩放无边框窗体
答案:1 悬赏:60
解决时间 2021-03-16 07:57
- 提问者网友:皆是孤独
- 2021-03-15 11:15
vb6缩放无边框窗体
最佳答案
- 二级知识专家网友:廢物販賣機
- 2021-03-15 11:46
假设右下角图片控件是Picture1
Dim x0, y0
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then x0 = X: y0 = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If Picture1.Left + X - x0 < 0 Then X = x0
If Picture1.Top + Y - y0 < 0 Then Y = y0
Picture1.Move Picture1.Left + X - x0, Picture1.Top + Y - y0
DoEvents
Me.Width = Me.Width + X - x0
Me.Height = Me.Height + Y - y0
End If
End Sub
Dim x0, y0
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then x0 = X: y0 = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If Picture1.Left + X - x0 < 0 Then X = x0
If Picture1.Top + Y - y0 < 0 Then Y = y0
Picture1.Move Picture1.Left + X - x0, Picture1.Top + Y - y0
DoEvents
Me.Width = Me.Width + X - x0
Me.Height = Me.Height + Y - y0
End If
End Sub
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯