这个应该可以试试spy++,检测下鼠标移动到的device,然后做出文件操作!
创新互联专注于企业营销型网站、网站重做改版、乐业网站定制设计、自适应品牌网站建设、H5建站、商城开发、集团公司官网建设、成都外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为乐业等各大城市提供网站开发制作服务。
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.BackgroundImage = My.Resources.a
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.BackgroundImage = My.Resources.b
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.BackgroundImage = My.Resources.a
End Sub
End Class
当然,你先得制作两张大小一样的图片
。net 不用api就行
缩放操作
Function 缩放(ByVal bitmap As Bitmap, ByVal 倍数 As Single) As Bitmap
Dim w As Integer = bitmap.Width * 倍数
Dim h As Integer = bitmap.Height * 倍数
Dim tem As New Bitmap(w, h)
Dim g As Graphics = Graphics.FromImage(tem)
g.DrawImage(bitmap, New Rectangle(0, 0, w, h), New Rectangle(0, 0, bitmap.Width, bitmap.Height), GraphicsUnit.Pixel)
g.Dispose()
Return tem
End Function
鼠标滚轮事件 MouseWheel
MouseEventArgs.Delta 值可以判断滚动方向