# Re: 图形问题

Posted by Gary Tsang on June 14, 1999 at 10:46:12:

In Reply to: 图形问题 posted by 阿宝 on June 14, 1999 at 08:54:17:

: 我在form中秀一张图,想在图上的某些区域再滑鼠按下时
: 产生如button的功能,该如何做

若是矩形的区域可用以下方法:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button=vbLeftButton Then
If X>=leftX and X<=RightX and Y>=TopY and Y<=BottomY Then
'add your code here
End If
End If
End Sub
若是不规则的区域...看"VB6 & Windows API讲座"P333吧!

Follow Ups: