如题,请高手指教!
解决方案 »
- 我写了个mp3播放器,如何实现双击一个mp3后,用当前已经打开的程序播放?
- struts如何连接数据库,能否将连接数据库单独做个类
- 请教如何应用RegDeleteKey,为什么我的程序不能删去指定的SubKey ? 代码如下
- 知道对方计算机名,如何知道对方计算机的日期及时间?
- VB 怎么把从数据库查出来的结果显示在label中呢??
- mdi子窗体中菜单,请帮助,谢谢!
- VB如何实现抓包?
- 有没有人看懂了《并行端口大全》里关于EPP模式通信的程序?小弟想请教一下。
- 谁来帮我 如何能作一个从(0,0)开始x,y轴有刻度没网格的曲线图 谢谢 !
- 哪位有《Microsoft Win 32程序参考大全(五)》?网上的都不可靠!I can't download!
- TabStrip如何通过程序定位到指定的卡片?
- SqlServer日期型字段时间数值存取的问题(在线等,立刻给分)
MSN:[email protected]
Dim y1 As Long
Dim x2 As Long
Dim y2 As Long
Dim x3 As Long
Dim y3 As Long
Dim w As Long
Dim h As Long
Dim t As Long
Dim l As Long
Dim DOING As Boolean
Dim going As Boolean
Private Sub Form_Load()With Shape2(0)
.FillStyle = 0
.Shape = 0
.Height = 80
.Width = 80
.Visible = False
End With
For i = 1 To 8
If i <> 4 Then
Load Shape2(i)
End If
NextWith Shape1
.Visible = False
.Shape = 0
.BorderStyle = 3
End WithEnd Sub
Private Sub Picture1_DblClick()
Shape1.Visible = False
For i = 0 To 8
If i <> 4 Then
Shape2(i).Visible = False
End If
Next
End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
x1 = X
y1 = Y
DOING = True
ElseIf Button = 2 Then
x2 = X
y2 = Y
w = Shape1.Width
h = Shape1.Height
ElseIf Button = 3 Then
x3 = X
y3 = Y
t = Shape1.Top
l = Shape1.Left
going = True
End If
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If DOING = True Then
If X >= x1 And Y >= y1 Then
Shape1.Visible = True
Shape1.Top = y1
Shape1.Left = x1
ElseIf X > x1 And Y < y1 Then
Shape1.Top = Y
ElseIf X < x1 And Y < y1 Then
Shape1.Top = Y
Shape1.Left = X
ElseIf X < x1 And Y > y1 Then
Shape1.Left = X
End If
Shape1.Height = Abs(Y - y1)
Shape1.Width = Abs(X - x1)
End If
ElseIf Button = 2 Then
Shape1.Width = IIf(w + X - x2 >= 0, w + X - x2, 0)
Shape1.Height = IIf(h + Y - y2 >= 0, h + Y - y2, 0)
ElseIf Button = 3 Then
If going = False Then Call Picture1_MouseDown(3, 0, X, Y)
Shape1.Top = t + Y - y3
Shape1.Left = l + X - x3
End If
If Button <> 0 Then
showpoint
If Shape2(0).Visible = False Then
For i = 0 To 8
If i <> 4 Then
Shape2(i).Visible = True
End If
Next
End If
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
DOING = False
going = False
End SubPrivate Sub showpoint()
For i = 0 To 8
If i <> 4 Then
If i \ 3 = 0 Then Shape2(i).Top = Shape1.Top - Shape2(i).Height / 2
If i \ 3 = 1 Then Shape2(i).Top = Shape1.Top + Shape1.Height / 2 - Shape2(i).Height / 2
If i \ 3 = 2 Then Shape2(i).Top = Shape1.Top + Shape1.Height - Shape2(i).Height / 2
If i Mod 3 = 0 Then Shape2(i).Left = Shape1.Left - Shape2(i).Height / 2
If i Mod 3 = 1 Then Shape2(i).Left = Shape1.Left + Shape1.Width / 2 - Shape2(i).Height / 2
If i Mod 3 = 2 Then Shape2(i).Left = Shape1.Left + Shape1.Width - Shape2(i).Height / 2
End If
Next
End Sub